17. Araxis Merge File Comparison Report

Produced by Araxis Merge on Sat May 2 08:30:11 2009 UTC. See www.araxis.com for information about Merge. This report uses XHTML and CSS2, and is best viewed with a reasonably standards compliant browser such as the latest version of Firefox or Internet Explorer. For optimum results when printing this report, use landscape orientation and enable printing of background images and colours in your browser.

17.1 Files compared

# Location File Last Modified
1 C:\Documents and Settings\allums\Desktop\2008.4\Formats\Shared\common\images images.xsl Mon Jan 19 18:02:54 2009 UTC
2 C:\Documents and Settings\allums\Desktop\2009.1\Formats\Shared\common\images images.xsl Sat May 2 06:55:56 2009 UTC

17.2 Comparison summary

Description Between
Files 1 and 2
Text Blocks Lines
Unchanged 5 1662
Changed 4 41
Inserted 0 0
Removed 0 0

17.3 Comparison options

Whitespace Differences in whitespace are significant
Character case Differences in character case are significant
Line endings Differences in line endings (CR and LF characters) are ignored
CR/LF characters Not shown in the comparison detail

17.4 Active regular expressions

Expression Description
\$(Author|Date|Header|Id|Locker|Name|RCSfile|Revision|Source|State):[^$]*\$ CVS comments

17.5 Comparison detail

1   <?xml vers ion="1.0"  encoding=" UTF-8"?>   1   <?xml vers ion="1.0"  encoding=" UTF-8"?>
2   <xsl:style sheet vers ion="1.0"  xmlns:xsl= "http://ww w.w3.org/1 999/XSL/Tr ansform"   2   <xsl:style sheet vers ion="1.0"  xmlns:xsl= "http://ww w.w3.org/1 999/XSL/Tr ansform"
3                                    xmlns:msxs l="urn:sch emas-micro soft-com:x slt"   3                                    xmlns:msxs l="urn:sch emas-micro soft-com:x slt"
4                                    xmlns:wwmo de="urn:We bWorks-Eng ine-Mode"   4                                    xmlns:wwmo de="urn:We bWorks-Eng ine-Mode"
5                                    xmlns:wwli nks="urn:W ebWorks-En gine-Links -Schema"   5                                    xmlns:wwli nks="urn:W ebWorks-En gine-Links -Schema"
6                                    xmlns:wwfi les="urn:W ebWorks-En gine-Files -Schema"   6                                    xmlns:wwfi les="urn:W ebWorks-En gine-Files -Schema"
7                                    xmlns:wwdo c="urn:Web Works-Docu ment-Schem a"   7                                    xmlns:wwdo c="urn:Web Works-Docu ment-Schem a"
8                                    xmlns:wwbe haviors="u rn:WebWork s-Behavior s-Schema"   8                                    xmlns:wwbe haviors="u rn:WebWork s-Behavior s-Schema"
9                                    xmlns:wwsp lits="urn: WebWorks-E ngine-Spli ts-Schema"   9                                    xmlns:wwsp lits="urn: WebWorks-E ngine-Spli ts-Schema"
10                                    xmlns:wwpr oject="urn :WebWorks- Publish-Pr oject"   10                                    xmlns:wwpr oject="urn :WebWorks- Publish-Pr oject"
11                                    xmlns:wwtr ait="urn:W ebWorks-En gine-Forma tTraitInfo -Schema"   11                                    xmlns:wwtr ait="urn:W ebWorks-En gine-Forma tTraitInfo -Schema"
12                                    xmlns:wwpr ogress="ur n:WebWorks -XSLT-Exte nsion-Prog ress"   12                                    xmlns:wwpr ogress="ur n:WebWorks -XSLT-Exte nsion-Prog ress"
13                                    xmlns:wwlo g="urn:Web Works-XSLT -Extension -Log"   13                                    xmlns:wwlo g="urn:Web Works-XSLT -Extension -Log"
14                                    xmlns:wwfi lesystem=" urn:WebWor ks-XSLT-Ex tension-Fi leSystem"   14                                    xmlns:wwfi lesystem=" urn:WebWor ks-XSLT-Ex tension-Fi leSystem"
15                                    xmlns:wwur i="urn:Web Works-XSLT -Extension -URI"   15                                    xmlns:wwur i="urn:Web Works-XSLT -Extension -URI"
16                                    xmlns:wwst ring="urn: WebWorks-X SLT-Extens ion-String Utilities"   16                                    xmlns:wwst ring="urn: WebWorks-X SLT-Extens ion-String Utilities"
17                                    xmlns:wwfi lesext="ur n:WebWorks -XSLT-Exte nsion-File s"   17                                    xmlns:wwfi lesext="ur n:WebWorks -XSLT-Exte nsion-File s"
18                                    xmlns:wwun its="urn:W ebWorks-XS LT-Extensi on-Units"   18                                    xmlns:wwun its="urn:W ebWorks-XS LT-Extensi on-Units"
19                                    xmlns:wwpr ojext="urn :WebWorks- XSLT-Exten sion-Proje ct"   19                                    xmlns:wwpr ojext="urn :WebWorks- XSLT-Exten sion-Proje ct"
20                                    xmlns:wwad apter="urn :WebWorks- XSLT-Exten sion-Adapt er"   20                                    xmlns:wwad apter="urn :WebWorks- XSLT-Exten sion-Adapt er"
21                                    xmlns:wwim aging="urn :WebWorks- XSLT-Exten sion-Imagi ng"   21                                    xmlns:wwim aging="urn :WebWorks- XSLT-Exten sion-Imagi ng"
22                                    xmlns:wwex sldoc="urn :WebWorks- XSLT-Exten sion-Docum ent"   22                                    xmlns:wwex sldoc="urn :WebWorks- XSLT-Exten sion-Docum ent"
23                                    exclude-re sult-prefi xes="xsl m sxsl wwmod e wwlinks  wwfiles ww doc wwbeha viors wwsp lits wwpro ject wwtra it wwprogr ess wwlog  wwfilesyst em wwuri w wstring ww filesext w wunits wwp rojext wwa dapter wwi maging wwe xsldoc"   23                                    exclude-re sult-prefi xes="xsl m sxsl wwmod e wwlinks  wwfiles ww doc wwbeha viors wwsp lits wwpro ject wwtra it wwprogr ess wwlog  wwfilesyst em wwuri w wstring ww filesext w wunits wwp rojext wwa dapter wwi maging wwe xsldoc"
24   >   24   >
25    <xsl:para m name="Gl obalInput"  />   25    <xsl:para m name="Gl obalInput"  />
26    <xsl:para m name="Gl obalPipeli neName" />   26    <xsl:para m name="Gl obalPipeli neName" />
27    <xsl:para m name="Gl obalProjec t" />   27    <xsl:para m name="Gl obalProjec t" />
28    <xsl:para m name="Gl obalFiles"  />   28    <xsl:para m name="Gl obalFiles"  />
29    <xsl:para m name="Pa rameterDep endsType"  />   29    <xsl:para m name="Pa rameterDep endsType"  />
30    <xsl:para m name="Pa rameterSpl itsType" / >   30    <xsl:para m name="Pa rameterSpl itsType" / >
31    <xsl:para m name="Pa rameterBeh aviorsType " />   31    <xsl:para m name="Pa rameterBeh aviorsType " />
32    <xsl:para m name="Pa rameterPos tScriptTyp e" />   32    <xsl:para m name="Pa rameterPos tScriptTyp e" />
33    <xsl:para m name="Pa rameterDef aultFormat " />   33    <xsl:para m name="Pa rameterDef aultFormat " />
34    <xsl:para m name="Pa rameterAll owThumbnai ls" />   34    <xsl:para m name="Pa rameterAll owThumbnai ls" />
35    <xsl:para m name="Pa rameterThu mbnailType " />   35    <xsl:para m name="Pa rameterThu mbnailType " />
36    <xsl:para m name="Pa rameterTyp e" />   36    <xsl:para m name="Pa rameterTyp e" />
37    <xsl:para m name="Pa rameterCat egory" />   37    <xsl:para m name="Pa rameterCat egory" />
38    <xsl:para m name="Pa rameterUse " />   38    <xsl:para m name="Pa rameterUse " />
39    <xsl:para m name="Pa rameterDep loy" />   39    <xsl:para m name="Pa rameterDep loy" />
40     40  
41     41  
42    <xsl:incl ude href=" wwtransfor m:common/i mages/util ities.xsl"  />   42    <xsl:incl ude href=" wwtransfor m:common/i mages/util ities.xsl"  />
43     43  
44     44  
45    <xsl:key  name="wwfi les-files- by-groupid -type" mat ch="wwfile s:File" us e="concat( @groupID,  ':', @type )" />   45    <xsl:key  name="wwfi les-files- by-groupid -type" mat ch="wwfile s:File" us e="concat( @groupID,  ':', @type )" />
46    <xsl:key  name="wwfi les-files- by-documen tid" match ="wwfiles: File" use= "@document ID" />   46    <xsl:key  name="wwfi les-files- by-documen tid" match ="wwfiles: File" use= "@document ID" />
47    <xsl:key  name="wwsp lits-frame s-by-docum entid" mat ch="wwspli ts:Frame"  use="@docu mentID" />   47    <xsl:key  name="wwsp lits-frame s-by-docum entid" mat ch="wwspli ts:Frame"  use="@docu mentID" />
48    <xsl:key  name="wwdo c-frames-b y-id" matc h="wwdoc:F rame" use= "@id" />   48    <xsl:key  name="wwdo c-frames-b y-id" matc h="wwdoc:F rame" use= "@id" />
49    <xsl:key  name="wwbe haviors-fr ames-by-id " match="w wbehaviors :Frame" us e="@id" />   49    <xsl:key  name="wwbe haviors-fr ames-by-id " match="w wbehaviors :Frame" us e="@id" />
50     50  
51     51  
52    <xsl:vari able name= "GlobalAct ionChecksu m">   52    <xsl:vari able name= "GlobalAct ionChecksu m">
53     <xsl:var iable name ="VarTrans formChecks ums">   53     <xsl:var iable name ="VarTrans formChecks ums">
54      <xsl:va lue-of sel ect="conca t(wwuri:As FilePath(' wwtransfor m:self'),  ':', wwfil esystem:Ge tChecksum( wwuri:AsFi lePath('ww transform: self')))"  />   54      <xsl:va lue-of sel ect="conca t(wwuri:As FilePath(' wwtransfor m:self'),  ':', wwfil esystem:Ge tChecksum( wwuri:AsFi lePath('ww transform: self')))"  />
55      <xsl:va lue-of sel ect="conca t(',', wwu ri:AsFileP ath('wwtra nsform:com mon/images /utilities .xsl'), ': ', wwfiles ystem:GetC hecksum(ww uri:AsFile Path('wwtr ansform:co mmon/image s/utilitie s.xsl')))"  />   55      <xsl:va lue-of sel ect="conca t(',', wwu ri:AsFileP ath('wwtra nsform:com mon/images /utilities .xsl'), ': ', wwfiles ystem:GetC hecksum(ww uri:AsFile Path('wwtr ansform:co mmon/image s/utilitie s.xsl')))"  />
56     </xsl:va riable>   56     </xsl:va riable>
57     <xsl:val ue-of sele ct="wwstri ng:MD5Chec ksum($VarT ransformCh ecksums)"  />   57     <xsl:val ue-of sele ct="wwstri ng:MD5Chec ksum($VarT ransformCh ecksums)"  />
58    </xsl:var iable>   58    </xsl:var iable>
59     59  
60     60  
61    <xsl:temp late match ="/">   61    <xsl:temp late match ="/">
62     <wwfiles :Files ver sion="1.0" >   62     <wwfiles :Files ver sion="1.0" >
63     63  
64      <!-- Gr oups -->   64      <!-- Gr oups -->
65      <!--         -->   65      <!--         -->
66      <xsl:va riable nam e="VarProj ectGroups"  select="$ GlobalProj ect/wwproj ect:Projec t/wwprojec t:Groups/w wproject:G roup" />   66      <xsl:va riable nam e="VarProj ectGroups"  select="$ GlobalProj ect/wwproj ect:Projec t/wwprojec t:Groups/w wproject:G roup" />
67      <xsl:va riable nam e="VarProj ectGroupsS tart" sele ct="wwprog ress:Start (count($Va rProjectGr oups))" />   67      <xsl:va riable nam e="VarProj ectGroupsS tart" sele ct="wwprog ress:Start (count($Va rProjectGr oups))" />
68      <xsl:fo r-each sel ect="$VarP rojectGrou ps">   68      <xsl:fo r-each sel ect="$VarP rojectGrou ps">
69       <xsl:v ariable na me="VarPro jectGroup"  select=". " />   69       <xsl:v ariable na me="VarPro jectGroup"  select=". " />
70     70  
71       <!-- S plits -->   71       <!-- S plits -->
72       <!--         -->   72       <!--         -->
73       <xsl:v ariable na me="VarPro jectGroupS tart" sele ct="wwprog ress:Start (1)" />   73       <xsl:v ariable na me="VarPro jectGroupS tart" sele ct="wwprog ress:Start (1)" />
74       <xsl:f or-each se lect="$Glo balInput[1 ]">   74       <xsl:f or-each se lect="$Glo balInput[1 ]">
75        <xsl: variable n ame="VarSp litsFiles"  select="k ey('wwfile s-files-by -groupid-t ype', conc at($VarPro jectGroup/ @GroupID,  ':', $Para meterSplit sType))" / >   75        <xsl: variable n ame="VarSp litsFiles"  select="k ey('wwfile s-files-by -groupid-t ype', conc at($VarPro jectGroup/ @GroupID,  ':', $Para meterSplit sType))" / >
76        <xsl: for-each s elect="$Va rSplitsFil es[1]">   76        <xsl: for-each s elect="$Va rSplitsFil es[1]">
77         <xsl :variable  name="VarS plitsFile"  select=". " />   77         <xsl :variable  name="VarS plitsFile"  select=". " />
78     78  
79         <!--  Load spli ts -->   79         <!--  Load spli ts -->
80         <!--               -->   80         <!--               -->
81         <xsl :variable  name="VarS plits" sel ect="wwexs ldoc:LoadX MLWithoutR esolver($V arSplitsFi le/@path)"  />   81         <xsl :variable  name="VarS plits" sel ect="wwexs ldoc:LoadX MLWithoutR esolver($V arSplitsFi le/@path)"  />
82         <xsl :if test=" count($Var Splits//ww splits:Fra me) &gt; 0 ">   82         <xsl :if test=" count($Var Splits//ww splits:Fra me) &gt; 0 ">
83          <!- - Document s -->   83          <!- - Document s -->
84          <!- -            -->   84          <!- -            -->
85          <xs l:variable  name="Var ProjectDoc uments" se lect="$Var ProjectGro up//wwproj ect:Docume nt" />   85          <xs l:variable  name="Var ProjectDoc uments" se lect="$Var ProjectGro up//wwproj ect:Docume nt" />
86          <xs l:variable  name="Var ProjectDoc umentsStar t" select= "wwprogres s:Start(co unt($VarPr ojectDocum ents))" />   86          <xs l:variable  name="Var ProjectDoc umentsStar t" select= "wwprogres s:Start(co unt($VarPr ojectDocum ents))" />
87          <xs l:for-each  select="$ VarProject Documents" >   87          <xs l:for-each  select="$ VarProject Documents" >
88           <x sl:variabl e name="Va rProjectDo cument" se lect="." / >   88           <x sl:variabl e name="Va rProjectDo cument" se lect="." / >
89     89  
90           <x sl:variabl e name="Va rProjectDo cumentStar t" select= "wwprogres s:Start(1) " />   90           <x sl:variabl e name="Va rProjectDo cumentStar t" select= "wwprogres s:Start(1) " />
91     91  
92           <! -- Aborted ? -->   92           <! -- Aborted ? -->
93           <! --           -->   93           <! --           -->
94           <x sl:if test ="not(wwpr ogress:Abo rt())">   94           <x sl:if test ="not(wwpr ogress:Abo rt())">
95            < !-- Docume nt Frames  -->   95            < !-- Docume nt Frames  -->
96            < !--                   -->   96            < !--                   -->
97            < xsl:for-ea ch select= "$VarSplit s[1]">   97            < xsl:for-ea ch select= "$VarSplit s[1]">
98              <xsl:varia ble name=" VarSplitFr ames" sele ct="key('w wsplits-fr ames-by-do cumentid',  $VarProje ctDocument /@Document ID)" />   98              <xsl:varia ble name=" VarSplitFr ames" sele ct="key('w wsplits-fr ames-by-do cumentid',  $VarProje ctDocument /@Document ID)" />
99              <xsl:if te st="count( $VarSplitF rames) &gt ; 0">   99              <xsl:if te st="count( $VarSplitF rames) &gt ; 0">
100               <!-- Load  document  -->   100               <!-- Load  document  -->
101               <!--                 -->   101               <!--                 -->
102               <xsl:for- each selec t="$Global Input[1]">   102               <xsl:for- each selec t="$Global Input[1]">
103                <xsl:var iable name ="VarDocum entFiles"  select="ke y('wwfiles -files-by- documentid ', $VarPro jectDocume nt/@Docume ntID)[@typ e = $Param eterDepend sType]" />   103                <xsl:var iable name ="VarDocum entFiles"  select="ke y('wwfiles -files-by- documentid ', $VarPro jectDocume nt/@Docume ntID)[@typ e = $Param eterDepend sType]" />
104                <xsl:var iable name ="VarBehav iorsFiles"  select="k ey('wwfile s-files-by -documenti d', $VarPr ojectDocum ent/@Docum entID)[@ty pe = $Para meterBehav iorsType]"  />   104                <xsl:var iable name ="VarBehav iorsFiles"  select="k ey('wwfile s-files-by -documenti d', $VarPr ojectDocum ent/@Docum entID)[@ty pe = $Para meterBehav iorsType]"  />
105     105  
106                <!-- Loa d document  -->   106                <!-- Loa d document  -->
107                <!--                 -->   107                <!--                 -->
108                <xsl:for -each sele ct="$VarDo cumentFile s[1]">   108                <xsl:for -each sele ct="$VarDo cumentFile s[1]">
109                 <xsl:va riable nam e="VarDocu mentFile"  select="."  />   109                 <xsl:va riable nam e="VarDocu mentFile"  select="."  />
110                 <xsl:va riable nam e="VarDocu ment" sele ct="wwexsl doc:LoadXM LWithoutRe solver($Va rDocumentF ile/@path) " />   110                 <xsl:va riable nam e="VarDocu ment" sele ct="wwexsl doc:LoadXM LWithoutRe solver($Va rDocumentF ile/@path) " />
111     111  
112                 <!-- Lo ad behavio rs -->   112                 <!-- Lo ad behavio rs -->
113                 <!--                  -->   113                 <!--                  -->
114                 <xsl:fo r-each sel ect="$VarB ehaviorsFi les[1]">   114                 <xsl:fo r-each sel ect="$VarB ehaviorsFi les[1]">
115                  <xsl:v ariable na me="VarBeh aviorsFile " select=" ." />   115                  <xsl:v ariable na me="VarBeh aviorsFile " select=" ." />
116                  <xsl:v ariable na me="VarBeh aviors" se lect="wwex sldoc:Load XMLWithout Resolver($ VarBehavio rsFile/@pa th)" />   116                  <xsl:v ariable na me="VarBeh aviors" se lect="wwex sldoc:Load XMLWithout Resolver($ VarBehavio rsFile/@pa th)" />
117     117  
118                  <!-- P rocess doc ument fram es -->   118                  <!-- P rocess doc ument fram es -->
119                  <!--                            -->   119                  <!--                            -->
120                  <xsl:v ariable na me="VarSpl itFramesSt art" selec t="wwprogr ess:Start( count($Var SplitFrame s))" />   120                  <xsl:v ariable na me="VarSpl itFramesSt art" selec t="wwprogr ess:Start( count($Var SplitFrame s))" />
121                  <xsl:f or-each se lect="$Var SplitFrame s">   121                  <xsl:f or-each se lect="$Var SplitFrame s">
122                   <xsl: variable n ame="VarSp litFrame"  select="."  />   122                   <xsl: variable n ame="VarSp litFrame"  select="."  />
123     123  
124                   <xsl: variable n ame="VarSp litFrameSt art" selec t="wwprogr ess:Start( 1)" />   124                   <xsl: variable n ame="VarSp litFrameSt art" selec t="wwprogr ess:Start( 1)" />
125     125  
126                   <!--  Aborted? - ->   126                   <!--  Aborted? - ->
127                   <!--           - ->   127                   <!--           - ->
128                   <xsl: if test="n ot(wwprogr ess:Abort( ))">   128                   <xsl: if test="n ot(wwprogr ess:Abort( ))">
129                    <!--  Graphic R ule -->   129                    <!--  Graphic R ule -->
130                    <!--                -->   130                    <!--                -->
131                    <xsl :variable  name="VarC ontextRule " select=" wwprojext: GetContext Rule('Grap hic', $Var SplitFrame /@stylenam e, $VarSpl itFrame/@d ocumentID,  $VarSplit Frame/@id) " />   131                    <xsl :variable  name="VarC ontextRule " select=" wwprojext: GetContext Rule('Grap hic', $Var SplitFrame /@stylenam e, $VarSpl itFrame/@d ocumentID,  $VarSplit Frame/@id) " />
132                    <xsl :variable  name="VarG enerateOut putOption"  select="$ VarContext Rule/wwpro ject:Optio ns/wwproje ct:Option[ @Name = 'g enerate-ou tput']/@Va lue" />   132                    <xsl :variable  name="VarG enerateOut putOption"  select="$ VarContext Rule/wwpro ject:Optio ns/wwproje ct:Option[ @Name = 'g enerate-ou tput']/@Va lue" />
133                    <xsl :variable  name="VarG enerateOut put" selec t="(string -length($V arGenerate OutputOpti on) = 0) o r ($VarGen erateOutpu tOption !=  'false')"  />   133                    <xsl :variable  name="VarG enerateOut put" selec t="(string -length($V arGenerate OutputOpti on) = 0) o r ($VarGen erateOutpu tOption !=  'false')"  />
134                    <xsl :if test=" $VarGenera teOutput">   134                    <xsl :if test=" $VarGenera teOutput">
135                     <!- - Locate d ocument fr ame -->   135                     <!- - Locate d ocument fr ame -->
136                     <!- -                         -->   136                     <!- -                         -->
137                     <xs l:for-each  select="$ VarDocumen t[1]">   137                     <xs l:for-each  select="$ VarDocumen t[1]">
138                      <x sl:variabl e name="Va rDocumentF rame" sele ct="key('w wdoc-frame s-by-id',  $VarSplitF rame/@id)[ 1]" />   138                      <x sl:variabl e name="Va rDocumentF rame" sele ct="key('w wdoc-frame s-by-id',  $VarSplitF rame/@id)[ 1]" />
139     139  
140                      <! -- Locate  behaviors  frame -->   140                      <! -- Locate  behaviors  frame -->
141                      <! --                          -->   141                      <! --                          -->
142                      <x sl:for-eac h select=" $VarBehavi ors[1]">   142                      <x sl:for-eac h select=" $VarBehavi ors[1]">
143                       < xsl:variab le name="V arBehavior sFrame" se lect="key( 'wwbehavio rs-frames- by-id', $V arSplitFra me/@id)[1] " />   143                       < xsl:variab le name="V arBehavior sFrame" se lect="key( 'wwbehavio rs-frames- by-id', $V arSplitFra me/@id)[1] " />
144     144  
145                       < !-- Full s ize -->   145                       < !-- Full s ize -->
146                       < !--            -->   146                       < !--            -->
147                       < xsl:call-t emplate na me="FullSi ze">   147                       < xsl:call-t emplate na me="FullSi ze">
148                         <xsl:with- param name ="ParamDoc umentFile"  select="$ VarDocumen tFile" />   148                         <xsl:with- param name ="ParamDoc umentFile"  select="$ VarDocumen tFile" />
149                         <xsl:with- param name ="ParamBeh aviorsFile " select=" $VarBehavi orsFile" / >   149                         <xsl:with- param name ="ParamBeh aviorsFile " select=" $VarBehavi orsFile" / >
150                         <xsl:with- param name ="ParamSpl itsFile" s elect="$Va rSplitsFil e" />   150                         <xsl:with- param name ="ParamSpl itsFile" s elect="$Va rSplitsFil e" />
151                         <xsl:with- param name ="ParamDoc umentFrame " select=" $VarDocume ntFrame" / >   151                         <xsl:with- param name ="ParamDoc umentFrame " select=" $VarDocume ntFrame" / >
152                         <xsl:with- param name ="ParamBeh aviorsFram e" select= "$VarBehav iorsFrame"  />   152                         <xsl:with- param name ="ParamBeh aviorsFram e" select= "$VarBehav iorsFrame"  />
153                         <xsl:with- param name ="ParamSpl itFrame" s elect="$Va rSplitFram e" />   153                         <xsl:with- param name ="ParamSpl itFrame" s elect="$Va rSplitFram e" />
154                         <xsl:with- param name ="ParamCon textRule"  select="$V arContextR ule" />   154                         <xsl:with- param name ="ParamCon textRule"  select="$V arContextR ule" />
155                       < /xsl:call- template>   155                       < /xsl:call- template>
156     156  
157                       < !-- Thumbn ail -->   157                       < !-- Thumbn ail -->
158                       < !--            -->   158                       < !--            -->
159                       < xsl:if tes t="$Parame terAllowTh umbnails =  'true'">   159                       < xsl:if tes t="$Parame terAllowTh umbnails =  'true'">
160                         <xsl:call- template n ame="Thumb nail">   160                         <xsl:call- template n ame="Thumb nail">
161                          <xsl:with -param nam e="ParamDo cumentFram e" select= "$VarDocum entFrame"  />   161                          <xsl:with -param nam e="ParamDo cumentFram e" select= "$VarDocum entFrame"  />
162                          <xsl:with -param nam e="ParamBe haviorsFra me" select ="$VarBeha viorsFrame " />   162                          <xsl:with -param nam e="ParamBe haviorsFra me" select ="$VarBeha viorsFrame " />
163                          <xsl:with -param nam e="ParamSp litFrame"  select="$V arSplitFra me" />   163                          <xsl:with -param nam e="ParamSp litFrame"  select="$V arSplitFra me" />
164                          <xsl:with -param nam e="ParamCo ntextRule"  select="$ VarContext Rule" />   164                          <xsl:with -param nam e="ParamCo ntextRule"  select="$ VarContext Rule" />
165                         </xsl:call -template>   165                         </xsl:call -template>
166                       < /xsl:if>   166                       < /xsl:if>
167                      </ xsl:for-ea ch>   167                      </ xsl:for-ea ch>
168                     </x sl:for-eac h>   168                     </x sl:for-eac h>
169                    </xs l:if>   169                    </xs l:if>
170                   </xsl :if>   170                   </xsl :if>
171     171  
172                   <xsl: variable n ame="VarSp litFrameEn d" select= "wwprogres s:End()" / >   172                   <xsl: variable n ame="VarSp litFrameEn d" select= "wwprogres s:End()" / >
173                  </xsl: for-each>   173                  </xsl: for-each>
174                 </xsl:f or-each>   174                 </xsl:f or-each>
175                 <xsl:va riable nam e="VarSpli tFramesEnd " select=" wwprogress :End()" />   175                 <xsl:va riable nam e="VarSpli tFramesEnd " select=" wwprogress :End()" />
176                </xsl:fo r-each>   176                </xsl:fo r-each>
177               </xsl:for -each>   177               </xsl:for -each>
178              </xsl:if>   178              </xsl:if>
179            < /xsl:for-e ach>   179            < /xsl:for-e ach>
180           </ xsl:if>   180           </ xsl:if>
181     181  
182           <x sl:variabl e name="Va rProjectDo cumentEnd"  select="w wprogress: End()" />   182           <x sl:variabl e name="Va rProjectDo cumentEnd"  select="w wprogress: End()" />
183     183  
184          </x sl:for-eac h>   184          </x sl:for-eac h>
185          <xs l:variable  name="Var ProjectDoc umentsEnd"  select="w wprogress: End()" />   185          <xs l:variable  name="Var ProjectDoc umentsEnd"  select="w wprogress: End()" />
186     186  
187         </xs l:if>   187         </xs l:if>
188     188  
189        </xsl :for-each>   189        </xsl :for-each>
190     190  
191       </xsl: for-each>   191       </xsl: for-each>
192       <xsl:v ariable na me="VarPro jectGroupE nd" select ="wwprogre ss:End()"  />   192       <xsl:v ariable na me="VarPro jectGroupE nd" select ="wwprogre ss:End()"  />
193     193  
194      </xsl:f or-each>   194      </xsl:f or-each>
195      <xsl:va riable nam e="VarProj ectGroupsE nd" select ="wwprogre ss:End()"  />   195      <xsl:va riable nam e="VarProj ectGroupsE nd" select ="wwprogre ss:End()"  />
196     196  
197     </wwfile s:Files>   197     </wwfile s:Files>
198    </xsl:tem plate>   198    </xsl:tem plate>
199     199  
200     200  
201    <xsl:temp late name= "FullSize" >   201    <xsl:temp late name= "FullSize" >
202     <xsl:par am name="P aramDocume ntFile" />   202     <xsl:par am name="P aramDocume ntFile" />
203     <xsl:par am name="P aramBehavi orsFile" / >   203     <xsl:par am name="P aramBehavi orsFile" / >
204     <xsl:par am name="P aramSplits File" />   204     <xsl:par am name="P aramSplits File" />
205     <xsl:par am name="P aramDocume ntFrame" / >   205     <xsl:par am name="P aramDocume ntFrame" / >
206     <xsl:par am name="P aramBehavi orsFrame"  />   206     <xsl:par am name="P aramBehavi orsFrame"  />
207     <xsl:par am name="P aramSplitF rame" />   207     <xsl:par am name="P aramSplitF rame" />
208     <xsl:par am name="P aramContex tRule" />   208     <xsl:par am name="P aramContex tRule" />
209     209  
210     <!-- Ski p by refer ence graph ics -->   210     <!-- Ski p by refer ence graph ics -->
211     <!--                               -->   211     <!--                               -->
212     <xsl:var iable name ="VarByRef erence" se lect="$Par amSplitFra me/@byref  = string(t rue())" />   212     <xsl:var iable name ="VarByRef erence" se lect="$Par amSplitFra me/@byref  = string(t rue())" />
213     <xsl:if  test="not( $VarByRefe rence)">   213     <xsl:if  test="not( $VarByRefe rence)">
214      <!-- Tr anslation  from sourc e image po ssible? -- >   214      <!-- Tr anslation  from sourc e image po ssible? -- >
215      <!--                                             -- >   215      <!--                                             -- >
216      <xsl:va riable nam e="VarTran slateAsTex t">   216      <xsl:va riable nam e="VarTran slateAsTex t">
217       <xsl:i f test="$ ParamSplit Fr a me/@by r ef-a llow ed-b y -wi f  = st r i n g(tru e ()) ">   217       <!-- R ule allows  by refere nce? -->
        218       <!--                              -->
        219       <xsl:v ariable na me="VarAll owByRefere nceGraphic sOption" s elect="$Pa ramContext Rule/wwpro ject:Optio ns/wwproje ct:Option[ @Name = 'b y-referenc e-graphics ']/@Value"  />
        220       <xsl:v ariable na me="VarAll owByRefere nceGraphic s" select= "(string-l ength($Var AllowByRef erenceGrap hicsOption ) = 0) or  ($VarAllow ByReferenc eGraphicsO ption = 't rue')" />
        221       <xsl:i f test="$ V a
r A llow B y Re f e r e n c e Graphics ">
218        <!--  Access sou rce image  info -->   222        <!--  Access sou rce image  info -->
219        <!--                             -->   223        <!--                             -->
220        <xsl: variable n ame="VarSo urceImageI nfo" selec t="wwimagi ng:GetInfo ($ParamSpl itFrame/@s ource)" />   224        <xsl: variable n ame="VarSo urceImageI nfo" selec t="wwimagi ng:GetInfo ($ParamSpl itFrame/@s ource)" />
221     225  
222        <!--  R a ster  i ma g e   fo r mat ? -->   226        <!--  Sc a l i n g
 
r equired ? -->
223        <!--                          -->   227        <!--                     
-->
224        
<xsl: v ar i a ble  name=" V ar R a s te rImag e Fo r m a
t AsT ext
"
>
  228        <xsl: variable n ame="VarSc alingRequi redAsText" >
225         
<xsl: call- t em p l a te  name=" I m
a g e s-R a
s t e
r Im a g e F or m a t "
>
  229         <xsl :call-temp late name= "Images-By RefImageRe quiresScal ing">
        230            <xsl: with-p ar
a m  name=" P ar
a mCon te xtRul e " select=" $Pa r
a mCon t
ext Rule "  / >
        231            <xsl: wi t h- p
a ram  name=" Para m Fr a m e Beh a vior"  s
e lect="$Pa r
a mB e havi or sFr a me "  / >
226          <xs l:with-par am name="P aramImageI nfo" selec t="$VarSou rceImageIn fo" />   232          <xs l:with-par am name="P aramImageI nfo" selec t="$VarSou rceImageIn fo" />
227         </xs l:call-tem plate>   233         </xs l:call-tem plate>
228        </xsl :variable>   234        </xsl :variable>
229        <xsl: variable n ame="Var RasterIm a
g
e Fo r mat " select=" $Var RasterIm a
g
e Fo r mat AsText = s tring(true ())" />
  235        <xsl: variable n ame="Var Sc a lin g R e qui r ed " select=" $Var Sc a lin g R e qui r ed AsText = s tring(true ())" />
        236  
        237        <!--  Rule has a  scale def ined? -->
        238        <!--                              -->
        239        <xsl: if test="n ot($VarSca lingRequir ed)">
        240         <!--  Qualify b ased on up stream pro cessing -- >
        241         <!--                                          -- >
        242         <xsl :if test=" $ParamSpli tFrame/@by ref-allowe d-by-wif =  string(tr ue())">
        243          <!- - Raster i mage forma t? -->
        244          <!- -                        -->
        245          <xs l:variable  name="Var RasterImag eFormatAsT ext">
        246           <x sl:call-te mplate nam e="Images- RasterImag eFormat">
        247            < xsl:with-p aram name= "ParamImag eInfo" sel ect="$VarS ourceImage Info" />
        248           </ xsl:call-t emplate>
        249          </x sl:variabl e>
        250          <xs l:variable  name="Var RasterImag eFormat" s elect="$Va rRasterIma geFormatAs Text = str ing(true() )" />
230     251  
231        
<!-- Allow  if raster  image for mat -->
  252            <!-- Allow  if raster  image for mat -->
232        
<!--                                 -->
  253            <!--                                 -->
233        
<xsl:value -of select ="$VarRast erImageFor mat" />
  254            <xsl:value -of select ="$VarRast erImageFor mat" />
        255         </xs l:if>
        256        </xsl :if>
234       </xsl: if>   257       </xsl: if>
235      </xsl:v ariable>   258      </xsl:v ariable>
236      <xsl:va riable nam e="VarTran slate" sel ect="$VarT ranslateAs Text = str ing(true() )" />   259      <xsl:va riable nam e="VarTran slate" sel ect="$VarT ranslateAs Text = str ing(true() )" />
237     260  
238      <xsl:ch oose>   261      <xsl:ch oose>
239       <!-- T ranslate f rom origio nal source  file -->   262       <!-- T ranslate f rom origio nal source  file -->
240       <!--                                          -->   263       <!--                                          -->
241       <xsl:w hen test=" $VarTransl ate">   264       <xsl:w hen test=" $VarTransl ate">
242        <xsl: call-templ ate name=" FullSize-T ranslate">   265        <xsl: call-templ ate name=" FullSize-T ranslate">
243         <xsl :with-para m name="Pa ramDocumen tFile" sel ect="$Para mDocumentF ile" />   266         <xsl :with-para m name="Pa ramDocumen tFile" sel ect="$Para mDocumentF ile" />
244         <xsl :with-para m name="Pa ramBehavio rsFile" se lect="$Par amBehavior sFile" />   267         <xsl :with-para m name="Pa ramBehavio rsFile" se lect="$Par amBehavior sFile" />
245         <xsl :with-para m name="Pa ramSplitsF ile" selec t="$ParamS plitsFile"  />   268         <xsl :with-para m name="Pa ramSplitsF ile" selec t="$ParamS plitsFile"  />
246         <xsl :with-para m name="Pa ramDocumen tFrame" se lect="$Par amDocument Frame" />   269         <xsl :with-para m name="Pa ramDocumen tFrame" se lect="$Par amDocument Frame" />
247         <xsl :with-para m name="Pa ramBehavio rsFrame" s elect="$Pa ramBehavio rsFrame" / >   270         <xsl :with-para m name="Pa ramBehavio rsFrame" s elect="$Pa ramBehavio rsFrame" / >
248         <xsl :with-para m name="Pa ramSplitFr ame" selec t="$ParamS plitFrame"  />   271         <xsl :with-para m name="Pa ramSplitFr ame" selec t="$ParamS plitFrame"  />
249         <xsl :with-para m name="Pa ramContext Rule" sele ct="$Param ContextRul e" />   272         <xsl :with-para m name="Pa ramContext Rule" sele ct="$Param ContextRul e" />
250        </xsl :call-temp late>   273        </xsl :call-temp late>
251       </xsl: when>   274       </xsl: when>
252     275  
253       <!-- R ender via  PostScript  -->   276       <!-- R ender via  PostScript  -->
254       <!--                          -->   277       <!--                          -->
255       <xsl:o therwise>   278       <xsl:o therwise>
256        <xsl: call-templ ate name=" FullSize-P ostScript" >   279        <xsl: call-templ ate name=" FullSize-P ostScript" >
257         <xsl :with-para m name="Pa ramDocumen tFile" sel ect="$Para mDocumentF ile" />   280         <xsl :with-para m name="Pa ramDocumen tFile" sel ect="$Para mDocumentF ile" />
258         <xsl :with-para m name="Pa ramBehavio rsFile" se lect="$Par amBehavior sFile" />   281         <xsl :with-para m name="Pa ramBehavio rsFile" se lect="$Par amBehavior sFile" />
259         <xsl :with-para m name="Pa ramSplitsF ile" selec t="$ParamS plitsFile"  />   282         <xsl :with-para m name="Pa ramSplitsF ile" selec t="$ParamS plitsFile"  />
260         <xsl :with-para m name="Pa ramDocumen tFrame" se lect="$Par amDocument Frame" />   283         <xsl :with-para m name="Pa ramDocumen tFrame" se lect="$Par amDocument Frame" />
261         <xsl :with-para m name="Pa ramBehavio rsFrame" s elect="$Pa ramBehavio rsFrame" / >   284         <xsl :with-para m name="Pa ramBehavio rsFrame" s elect="$Pa ramBehavio rsFrame" / >
262         <xsl :with-para m name="Pa ramSplitFr ame" selec t="$ParamS plitFrame"  />   285         <xsl :with-para m name="Pa ramSplitFr ame" selec t="$ParamS plitFrame"  />
263         <xsl :with-para m name="Pa ramContext Rule" sele ct="$Param ContextRul e" />   286         <xsl :with-para m name="Pa ramContext Rule" sele ct="$Param ContextRul e" />
264        </xsl :call-temp late>   287        </xsl :call-temp late>
265       </xsl: otherwise>   288       </xsl: otherwise>
266      </xsl:c hoose>   289      </xsl:c hoose>
267     </xsl:if >   290     </xsl:if >
268    </xsl:tem plate>   291    </xsl:tem plate>
269     292  
270     293  
271    <xsl:temp late name= "FullSize- Translate" >   294    <xsl:temp late name= "FullSize- Translate" >
272     <xsl:par am name="P aramDocume ntFile" />   295     <xsl:par am name="P aramDocume ntFile" />
273     <xsl:par am name="P aramBehavi orsFile" / >   296     <xsl:par am name="P aramBehavi orsFile" / >
274     <xsl:par am name="P aramSplits File" />   297     <xsl:par am name="P aramSplits File" />
275     <xsl:par am name="P aramDocume ntFrame" / >   298     <xsl:par am name="P aramDocume ntFrame" / >
276     <xsl:par am name="P aramBehavi orsFrame"  />   299     <xsl:par am name="P aramBehavi orsFrame"  />
277     <xsl:par am name="P aramSplitF rame" />   300     <xsl:par am name="P aramSplitF rame" />
278     <xsl:par am name="P aramContex tRule" />   301     <xsl:par am name="P aramContex tRule" />
279     302  
280     <!-- Get  image-sca le marker  -->   303     <!-- Get  image-sca le marker  -->
281     <!--                           -->   304     <!--                           -->
282     <xsl:var iable name ="VarImage Scale">   305     <xsl:var iable name ="VarImage Scale">
283      <xsl:ca ll-templat e name="Im ages-Image ScaleMarke rValue">   306      <xsl:ca ll-templat e name="Im ages-Image ScaleMarke rValue">
284       <xsl:w ith-param  name="Para mFrameBeha vior" sele ct="$Param BehaviorsF rame" />   307       <xsl:w ith-param  name="Para mFrameBeha vior" sele ct="$Param BehaviorsF rame" />
285      </xsl:c all-templa te>   308      </xsl:c all-templa te>
286     </xsl:va riable>   309     </xsl:va riable>
287     310  
288     <!-- Get  graphic o ptions -->   311     <!-- Get  graphic o ptions -->
289     <!--                       -->   312     <!--                       -->
290     <xsl:var iable name ="VarScale Option" se lect="$Par amContextR ule/wwproj ect:Option s/wwprojec t:Option[@ Name = 'sc ale']/@Val ue" />   313     <xsl:var iable name ="VarScale Option" se lect="$Par amContextR ule/wwproj ect:Option s/wwprojec t:Option[@ Name = 'sc ale']/@Val ue" />
291     <xsl:var iable name ="VarMaxWi dthOption" >   314     <xsl:var iable name ="VarMaxWi dthOption" >
292      <xsl:ca ll-templat e name="Im ages-MaxSi zeOption">   315      <xsl:ca ll-templat e name="Im ages-MaxSi zeOption">
293       <xsl:w ith-param  name="Para mMaxSizeOp tionValue"  select="$ ParamConte xtRule/wwp roject:Opt ions/wwpro ject:Optio n[@Name =  'max-width ']/@Value"  />   316       <xsl:w ith-param  name="Para mMaxSizeOp tionValue"  select="$ ParamConte xtRule/wwp roject:Opt ions/wwpro ject:Optio n[@Name =  'max-width ']/@Value"  />
294      </xsl:c all-templa te>   317      </xsl:c all-templa te>
295     </xsl:va riable>   318     </xsl:va riable>
296     <xsl:var iable name ="VarMaxHe ightOption ">   319     <xsl:var iable name ="VarMaxHe ightOption ">
297      <xsl:ca ll-templat e name="Im ages-MaxSi zeOption">   320      <xsl:ca ll-templat e name="Im ages-MaxSi zeOption">
298       <xsl:w ith-param  name="Para mMaxSizeOp tionValue"  select="$ ParamConte xtRule/wwp roject:Opt ions/wwpro ject:Optio n[@Name =  'max-heigh t']/@Value " />   321       <xsl:w ith-param  name="Para mMaxSizeOp tionValue"  select="$ ParamConte xtRule/wwp roject:Opt ions/wwpro ject:Optio n[@Name =  'max-heigh t']/@Value " />
299      </xsl:c all-templa te>   322      </xsl:c all-templa te>
300     </xsl:va riable>   323     </xsl:va riable>
301     324  
302     <!-- Gen erate imag e -->   325     <!-- Gen erate imag e -->
303     <!--                  -->   326     <!--                  -->
304     <xsl:var iable name ="VarImage UpToDate"  select="ww filesext:U pToDate($P aramSplitF rame/@path , concat($ GlobalProj ect/wwproj ect:Projec t/@ChangeI D, ':', $V arImageSca le, ':', $ VarScaleOp tion, ':',  $VarMaxWi dthOption,  ':', $Var MaxHeightO ption), $P aramSplitF rame/@grou pID, $Para mSplitFram e/@documen tID, $Glob alActionCh ecksum)" / >   327     <xsl:var iable name ="VarImage UpToDate"  select="ww filesext:U pToDate($P aramSplitF rame/@path , concat($ GlobalProj ect/wwproj ect:Projec t/@ChangeI D, ':', $V arImageSca le, ':', $ VarScaleOp tion, ':',  $VarMaxWi dthOption,  ':', $Var MaxHeightO ption), $P aramSplitF rame/@grou pID, $Para mSplitFram e/@documen tID, $Glob alActionCh ecksum)" / >
305     <xsl:if  test="not( $VarImageU pToDate)">   328     <xsl:if  test="not( $VarImageU pToDate)">
306      <!-- Lo ad image i nfo -->   329      <!-- Lo ad image i nfo -->
307      <!--                   -->   330      <!--                   -->
308      <xsl:va riable nam e="VarImag eInfo" sel ect="wwima ging:GetIn fo($ParamS plitFrame/ @source)"  />   331      <xsl:va riable nam e="VarImag eInfo" sel ect="wwima ging:GetIn fo($ParamS plitFrame/ @source)"  />
309     332  
310      <!-- De fine initi al width/h eight -->   333      <!-- De fine initi al width/h eight -->
311      <!--                                -->   334      <!--                                -->
312      <xsl:va riable nam e="VarByRe ferenceGra phicsUseDo cumentDime nsionsOpti on" select ="$ParamCo ntextRule/ wwproject: Options/ww project:Op tion[@Name  = 'by-ref erence-use -document- dimensions ']/@Value"  />   335      <xsl:va riable nam e="VarByRe ferenceGra phicsUseDo cumentDime nsionsOpti on" select ="$ParamCo ntextRule/ wwproject: Options/ww project:Op tion[@Name  = 'by-ref erence-use -document- dimensions ']/@Value"  />
313      <xsl:va riable nam e="VarByRe ferenceGra phicsUseDo cumentDime nsions" se lect="(str ing-length ($VarByRef erenceGrap hicsUseDoc umentDimen sionsOptio n) = 0) or  ($VarByRe ferenceGra phicsUseDo cumentDime nsionsOpti on = 'true ')" />   336      <xsl:va riable nam e="VarByRe ferenceGra phicsUseDo cumentDime nsions" se lect="(str ing-length ($VarByRef erenceGrap hicsUseDoc umentDimen sionsOptio n) = 0) or  ($VarByRe ferenceGra phicsUseDo cumentDime nsionsOpti on = 'true ')" />
314      <xsl:va riable nam e="VarInit ialWidth">   337      <xsl:va riable nam e="VarInit ialWidth">
315       <xsl:c hoose>   338       <xsl:c hoose>
316        <xsl: when test= "($VarByRe ferenceGra phicsUseDo cumentDime nsions) or  ($VarImag eInfo/@wid th = 0)">   339        <xsl: when test= "($VarByRe ferenceGra phicsUseDo cumentDime nsions) or  ($VarImag eInfo/@wid th = 0)">
317         <xsl :variable  name="VarD ocumentFra meWidth" s elect="wwu nits:Numer icPrefix($ ParamDocum entFrame/w wdoc:Attri bute[@name  = 'width' ]/@value)"  />   340         <xsl :variable  name="VarD ocumentFra meWidth" s elect="wwu nits:Numer icPrefix($ ParamDocum entFrame/w wdoc:Attri bute[@name  = 'width' ]/@value)"  />
318     341  
319         <xsl :value-of  select="ww units:Conv ert($VarDo cumentFram eWidth, 'p oints', 'i nches') *  96" />   342         <xsl :value-of  select="ww units:Conv ert($VarDo cumentFram eWidth, 'p oints', 'i nches') *  96" />
320        </xsl :when>   343        </xsl :when>
321     344  
322        <xsl: otherwise>   345        <xsl: otherwise>
323         <xsl :value-of  select="$V arImageInf o/@width"  />   346         <xsl :value-of  select="$V arImageInf o/@width"  />
324        </xsl :otherwise >   347        </xsl :otherwise >
325       </xsl: choose>   348       </xsl: choose>
326      </xsl:v ariable>   349      </xsl:v ariable>
327      <xsl:va riable nam e="VarInit ialHeight" >   350      <xsl:va riable nam e="VarInit ialHeight" >
328       <xsl:c hoose>   351       <xsl:c hoose>
329        <xsl: when test= "($VarByRe ferenceGra phicsUseDo cumentDime nsions) or  ($VarImag eInfo/@hei ght = 0)">   352        <xsl: when test= "($VarByRe ferenceGra phicsUseDo cumentDime nsions) or  ($VarImag eInfo/@hei ght = 0)">
330         <xsl :variable  name="VarD ocumentFra meHeight"  select="ww units:Nume ricPrefix( $ParamDocu mentFrame/ wwdoc:Attr ibute[@nam e = 'heigh t']/@value )" />   353         <xsl :variable  name="VarD ocumentFra meHeight"  select="ww units:Nume ricPrefix( $ParamDocu mentFrame/ wwdoc:Attr ibute[@nam e = 'heigh t']/@value )" />
331     354  
332         <xsl :value-of  select="ww units:Conv ert($VarDo cumentFram eHeight, ' points', ' inches') *  96" />   355         <xsl :value-of  select="ww units:Conv ert($VarDo cumentFram eHeight, ' points', ' inches') *  96" />
333        </xsl :when>   356        </xsl :when>
334     357  
335        <xsl: otherwise>   358        <xsl: otherwise>
336         <xsl :value-of  select="$V arImageInf o/@height"  />   359         <xsl :value-of  select="$V arImageInf o/@height"  />
337        </xsl :otherwise >   360        </xsl :otherwise >
338       </xsl: choose>   361       </xsl: choose>
339      </xsl:v ariable>   362      </xsl:v ariable>
340     363  
341      <!-- De termine up  scaling f actor -->   364      <!-- De termine up  scaling f actor -->
342      <!--                                -->   365      <!--                                -->
343      <xsl:va riable nam e="VarUpSc alingFacto r">   366      <xsl:va riable nam e="VarUpSc alingFacto r">
344       <xsl:c hoose>   367       <xsl:c hoose>
345        <!--  Use image- scale mark ers if def ined -->   368        <!--  Use image- scale mark ers if def ined -->
346        <!--                                        -->   369        <!--                                        -->
347        <xsl: when test= "string-le ngth($VarI mageScale)  &gt; 0">   370        <xsl: when test= "string-le ngth($VarI mageScale)  &gt; 0">
348         <xsl :value-of  select="$V arImageSca le div 100 .0" />   371         <xsl :value-of  select="$V arImageSca le div 100 .0" />
349        </xsl :when>   372        </xsl :when>
350     373  
351        <!--  Scale -->   374        <!--  Scale -->
352        <!--        -->   375        <!--        -->
353        <xsl: when test= "(string-l ength($Var ScaleOptio n) &gt; 0)  and ($Var ScaleOptio n != 'none ') and (nu mber($VarS caleOption ) &gt; 0)" >   376        <xsl: when test= "(string-l ength($Var ScaleOptio n) &gt; 0)  and ($Var ScaleOptio n != 'none ') and (nu mber($VarS caleOption ) &gt; 0)" >
354         <xsl :value-of  select="$V arScaleOpt ion div 10 0.0" />   377         <xsl :value-of  select="$V arScaleOpt ion div 10 0.0" />
355        </xsl :when>   378        </xsl :when>
356     379  
357        <xsl: otherwise>   380        <xsl: otherwise>
358         <xsl :value-of  select="1. 0" />   381         <xsl :value-of  select="1. 0" />
359        </xsl :otherwise >   382        </xsl :otherwise >
360       </xsl: choose>   383       </xsl: choose>
361      </xsl:v ariable>   384      </xsl:v ariable>
362     385  
363      <!-- De termine sc aled width /height -- >   386      <!-- De termine sc aled width /height -- >
364      <!--                                  -- >   387      <!--                                  -- >
365      <xsl:va riable nam e="VarScal edWidth">   388      <xsl:va riable nam e="VarScal edWidth">
366       <xsl:v alue-of se lect="$Var InitialWid th * $VarU pScalingFa ctor" />   389       <xsl:v alue-of se lect="$Var InitialWid th * $VarU pScalingFa ctor" />
367      </xsl:v ariable>   390      </xsl:v ariable>
368      <xsl:va riable nam e="VarScal edHeight">   391      <xsl:va riable nam e="VarScal edHeight">
369       <xsl:v alue-of se lect="$Var InitialHei ght * $Var UpScalingF actor" />   392       <xsl:v alue-of se lect="$Var InitialHei ght * $Var UpScalingF actor" />
370      </xsl:v ariable>   393      </xsl:v ariable>
371     394  
372      <!-- De termine do wn scaling  factor -- >   395      <!-- De termine do wn scaling  factor -- >
373      <!--                                  -- >   396      <!--                                  -- >
374      <xsl:va riable nam e="VarDown ScalingFac tor">   397      <xsl:va riable nam e="VarDown ScalingFac tor">
375       <xsl:c hoose>   398       <xsl:c hoose>
376        <!--  Max Width/ Height -->   399        <!--  Max Width/ Height -->
377        <!--                    -->   400        <!--                    -->
378        <xsl: when test= "($VarMaxW idthOption  &gt; 0) o r ($VarMax HeightOpti on &gt; 0) ">   401        <xsl: when test= "($VarMaxW idthOption  &gt; 0) o r ($VarMax HeightOpti on &gt; 0) ">
379         <!--  Determine  scaling r atio -->   402         <!--  Determine  scaling r atio -->
380         <!--                            -->   403         <!--                            -->
381         <xsl :variable  name="VarW idthRatio"  select="$ VarMaxWidt hOption di v $VarScal edWidth" / >   404         <xsl :variable  name="VarW idthRatio"  select="$ VarMaxWidt hOption di v $VarScal edWidth" / >
382         <xsl :variable  name="VarH eightRatio " select=" $VarMaxHei ghtOption  div $VarSc aledHeight " />   405         <xsl :variable  name="VarH eightRatio " select=" $VarMaxHei ghtOption  div $VarSc aledHeight " />
383         <xsl :choose>   406         <xsl :choose>
384          <xs l:when tes t="($VarWi dthRatio & lt; 1.0) a nd ((($Var WidthRatio  &gt; 0) a nd ($VarWi dthRatio & lt; $VarHe ightRatio) ) or ($Var HeightRati o = 0))">   407          <xs l:when tes t="($VarWi dthRatio & lt; 1.0) a nd ((($Var WidthRatio  &gt; 0) a nd ($VarWi dthRatio & lt; $VarHe ightRatio) ) or ($Var HeightRati o = 0))">
385           <x sl:value-o f select=" $VarWidthR atio" />   408           <x sl:value-o f select=" $VarWidthR atio" />
386          </x sl:when>   409          </x sl:when>
387     410  
388          <xs l:when tes t="$VarHei ghtRatio & lt; 1.0">   411          <xs l:when tes t="$VarHei ghtRatio & lt; 1.0">
389           <x sl:value-o f select=" $VarHeight Ratio" />   412           <x sl:value-o f select=" $VarHeight Ratio" />
390          </x sl:when>   413          </x sl:when>
391     414  
392          <xs l:otherwis e>   415          <xs l:otherwis e>
393           <x sl:value-o f select=" 1.0" />   416           <x sl:value-o f select=" 1.0" />
394          </x sl:otherwi se>   417          </x sl:otherwi se>
395         </xs l:choose>   418         </xs l:choose>
396        </xsl :when>   419        </xsl :when>
397     420  
398        <xsl: otherwise>   421        <xsl: otherwise>
399         <xsl :value-of  select="1. 0" />   422         <xsl :value-of  select="1. 0" />
400        </xsl :otherwise >   423        </xsl :otherwise >
401       </xsl: choose>   424       </xsl: choose>
402      </xsl:v ariable>   425      </xsl:v ariable>
403     426  
404      <!-- De termine ta rget width /height -- >   427      <!-- De termine ta rget width /height -- >
405      <!--                                  -- >   428      <!--                                  -- >
406      <xsl:va riable nam e="VarTarg etWidth">   429      <xsl:va riable nam e="VarTarg etWidth">
407       <xsl:v alue-of se lect="ceil ing($VarDo wnScalingF actor * $V arScaledWi dth)" />   430       <xsl:v alue-of se lect="ceil ing($VarDo wnScalingF actor * $V arScaledWi dth)" />
408      </xsl:v ariable>   431      </xsl:v ariable>
409      <xsl:va riable nam e="VarTarg etHeight">   432      <xsl:va riable nam e="VarTarg etHeight">
410       <xsl:v alue-of se lect="ceil ing($VarDo wnScalingF actor * $V arScaledHe ight)" />   433       <xsl:v alue-of se lect="ceil ing($VarDo wnScalingF actor * $V arScaledHe ight)" />
411      </xsl:v ariable>   434      </xsl:v ariable>
412     435  
413      <!-- Fo rmat -->   436      <!-- Fo rmat -->
414      <!--         -->   437      <!--         -->
415      <xsl:va riable nam e="VarForm at">   438      <xsl:va riable nam e="VarForm at">
416       <xsl:v ariable na me="VarFor matOption"  select="$ ParamConte xtRule/wwp roject:Opt ions/wwpro ject:Optio n[@Name =  'format']/ @Value" />   439       <xsl:v ariable na me="VarFor matOption"  select="$ ParamConte xtRule/wwp roject:Opt ions/wwpro ject:Optio n[@Name =  'format']/ @Value" />
417       <xsl:c hoose>   440       <xsl:c hoose>
418        <xsl: when test= "string-le ngth($VarF ormatOptio n) &gt; 0" >   441        <xsl: when test= "string-le ngth($VarF ormatOptio n) &gt; 0" >
419         <xsl :value-of  select="$V arFormatOp tion" />   442         <xsl :value-of  select="$V arFormatOp tion" />
420        </xsl :when>   443        </xsl :when>
421     444  
422        <xsl: otherwise>   445        <xsl: otherwise>
423         <xsl :value-of  select="$P arameterDe faultForma t" />   446         <xsl :value-of  select="$P arameterDe faultForma t" />
424        </xsl :otherwise >   447        </xsl :otherwise >
425       </xsl: choose>   448       </xsl: choose>
426      </xsl:v ariable>   449      </xsl:v ariable>
427     450  
428      <!-- Qu ality (for  JPEGs) -- >   451      <!-- Qu ality (for  JPEGs) -- >
429      <!--                       -- >   452      <!--                       -- >
430      <xsl:va riable nam e="VarQual ity">   453      <xsl:va riable nam e="VarQual ity">
431       <xsl:v ariable na me="VarQua lityOption " select=" $ParamCont extRule/ww project:Op tions/wwpr oject:Opti on[@Name =  'quality' ]/@Value"  />   454       <xsl:v ariable na me="VarQua lityOption " select=" $ParamCont extRule/ww project:Op tions/wwpr oject:Opti on[@Name =  'quality' ]/@Value"  />
432     455  
433       <xsl:c hoose>   456       <xsl:c hoose>
434        <xsl: when test= "number($V arQualityO ption) &gt ; 0">   457        <xsl: when test= "number($V arQualityO ption) &gt ; 0">
435         <xsl :value-of  select="$V arQualityO ption" />   458         <xsl :value-of  select="$V arQualityO ption" />
436        </xsl :when>   459        </xsl :when>
437     460  
438        <xsl: otherwise>   461        <xsl: otherwise>
439         <xsl :value-of  select="75 " />   462         <xsl :value-of  select="75 " />
440        </xsl :otherwise >   463        </xsl :otherwise >
441       </xsl: choose>   464       </xsl: choose>
442      </xsl:v ariable>   465      </xsl:v ariable>
443     466  
444      <!-- Tr ansform -- >   467      <!-- Tr ansform -- >
445      <!--            -- >   468      <!--            -- >
446      <xsl:va riable nam e="VarTran sform" sel ect="wwima ging:Trans form($Para mSplitFram e/@source,  $VarForma t, $VarQua lity, $Var TargetWidt h, $VarTar getHeight,  $ParamSpl itFrame/@p ath)" />   469      <xsl:va riable nam e="VarTran sform" sel ect="wwima ging:Trans form($Para mSplitFram e/@source,  $VarForma t, $VarQua lity, $Var TargetWidt h, $VarTar getHeight,  $ParamSpl itFrame/@p ath)" />
447     </xsl:if >   470     </xsl:if >
448     471  
449     <!-- Dep endency in fo -->   472     <!-- Dep endency in fo -->
450     <!--                   -->   473     <!--                   -->
451     <wwfiles :File path ="{$ParamS plitFrame/ @path}" ty pe="{$Para meterType} " checksum ="{wwfiles ystem:GetC hecksum($P aramSplitF rame/@path )}" projec tchecksum= "{concat($ GlobalProj ect/wwproj ect:Projec t/@ChangeI D, ':', $V arImageSca le, ':', $ VarScaleOp tion, ':',  $VarMaxWi dthOption,  ':', $Var MaxHeightO ption)}" g roupID="{$ ParamSplit Frame/@gro upID}" doc umentID="{ $ParamSpli tFrame/@do cumentID}"  actionche cksum="{$G lobalActio nChecksum} " category ="{$Parame terCategor y}" use="{ $Parameter Use}" depl oy="{$Para meterDeplo y}">   474     <wwfiles :File path ="{$ParamS plitFrame/ @path}" ty pe="{$Para meterType} " checksum ="{wwfiles ystem:GetC hecksum($P aramSplitF rame/@path )}" projec tchecksum= "{concat($ GlobalProj ect/wwproj ect:Projec t/@ChangeI D, ':', $V arImageSca le, ':', $ VarScaleOp tion, ':',  $VarMaxWi dthOption,  ':', $Var MaxHeightO ption)}" g roupID="{$ ParamSplit Frame/@gro upID}" doc umentID="{ $ParamSpli tFrame/@do cumentID}"  actionche cksum="{$G lobalActio nChecksum} " category ="{$Parame terCategor y}" use="{ $Parameter Use}" depl oy="{$Para meterDeplo y}">
452      <wwfile s:Depends  path="{$Pa ramSplitFr ame/@sourc e}" checks um="{wwfil esystem:Ge tChecksum( $ParamSpli tFrame/@so urce)}" gr oupID="" d ocumentID= "" />   475      <wwfile s:Depends  path="{$Pa ramSplitFr ame/@sourc e}" checks um="{wwfil esystem:Ge tChecksum( $ParamSpli tFrame/@so urce)}" gr oupID="" d ocumentID= "" />
453      <wwfile s:Depends  path="{$Pa ramBehavio rsFile/@pa th}" check sum="{$Par amBehavior sFile/@che cksum}" gr oupID="{$P aramBehavi orsFile/@g roupID}" d ocumentID= "{$ParamBe haviorsFil e/@documen tID}" />   476      <wwfile s:Depends  path="{$Pa ramBehavio rsFile/@pa th}" check sum="{$Par amBehavior sFile/@che cksum}" gr oupID="{$P aramBehavi orsFile/@g roupID}" d ocumentID= "{$ParamBe haviorsFil e/@documen tID}" />
454     </wwfile s:File>   477     </wwfile s:File>
455    </xsl:tem plate>   478    </xsl:tem plate>
456     479  
457     480  
458    <xsl:temp late name= "FullSize- PostScript ">   481    <xsl:temp late name= "FullSize- PostScript ">
459     <xsl:par am name="P aramDocume ntFile" />   482     <xsl:par am name="P aramDocume ntFile" />
460     <xsl:par am name="P aramBehavi orsFile" / >   483     <xsl:par am name="P aramBehavi orsFile" / >
461     <xsl:par am name="P aramSplits File" />   484     <xsl:par am name="P aramSplits File" />
462     <xsl:par am name="P aramDocume ntFrame" / >   485     <xsl:par am name="P aramDocume ntFrame" / >
463     <xsl:par am name="P aramBehavi orsFrame"  />   486     <xsl:par am name="P aramBehavi orsFrame"  />
464     <xsl:par am name="P aramSplitF rame" />   487     <xsl:par am name="P aramSplitF rame" />
465     <xsl:par am name="P aramContex tRule" />   488     <xsl:par am name="P aramContex tRule" />
466     489  
467     <!-- Gen erate Post Script -->   490     <!-- Gen erate Post Script -->
468     <!--                       -->   491     <!--                       -->
469     <xsl:var iable name ="VarPostS criptPath"  select="w wfilesyste m:Combine( wwprojext: GetDocumen tDataDirec toryPath($ ParamSplit Frame/@doc umentID),  concat(tra nslate($Pa rameterTyp e, ':', '_ '), '_', $ ParamSplit Frame/@id,  '.ps'))"  />   492     <xsl:var iable name ="VarPostS criptPath"  select="w wfilesyste m:Combine( wwprojext: GetDocumen tDataDirec toryPath($ ParamSplit Frame/@doc umentID),  concat(tra nslate($Pa rameterTyp e, ':', '_ '), '_', $ ParamSplit Frame/@id,  '.ps'))"  />
470     <xsl:var iable name ="VarPostS criptUpToD ate" selec t="wwfiles ext:UpToDa te($VarPos tScriptPat h, '', $Pa ramSplitFr ame/@group ID, $Param SplitFrame /@document ID, $Globa lActionChe cksum)" />   493     <xsl:var iable name ="VarPostS criptUpToD ate" selec t="wwfiles ext:UpToDa te($VarPos tScriptPat h, '', $Pa ramSplitFr ame/@group ID, $Param SplitFrame /@document ID, $Globa lActionChe cksum)" />
471     <xsl:if  test="not( $VarPostSc riptUpToDa te)">   494     <xsl:if  test="not( $VarPostSc riptUpToDa te)">
472      <xsl:va riable nam e="VarIgno reResult"  select="ww adapter:Ge neratePost ScriptForI mage($Para mDocumentF rame, $Var PostScript Path)" />   495      <xsl:va riable nam e="VarIgno reResult"  select="ww adapter:Ge neratePost ScriptForI mage($Para mDocumentF rame, $Var PostScript Path)" />
473     </xsl:if >   496     </xsl:if >
474     497  
475     <!-- Dep endency in fo -->   498     <!-- Dep endency in fo -->
476     <!--                   -->   499     <!--                   -->
477     <xsl:var iable name ="VarPostS criptCheck sum" selec t="wwfiles ystem:GetC hecksum($V arPostScri ptPath)" / >   500     <xsl:var iable name ="VarPostS criptCheck sum" selec t="wwfiles ystem:GetC hecksum($V arPostScri ptPath)" / >
478     <wwfiles :File path ="{$VarPos tScriptPat h}" type=" $Parameter PostScript Type" chec ksum="{$Va rPostScrip tChecksum} " projectc hecksum=""  groupID=" {$ParamSpl itFrame/@g roupID}" d ocumentID= "{$ParamSp litFrame/@ documentID }" actionc hecksum="{ $GlobalAct ionChecksu m}">   501     <wwfiles :File path ="{$VarPos tScriptPat h}" type=" $Parameter PostScript Type" chec ksum="{$Va rPostScrip tChecksum} " projectc hecksum=""  groupID=" {$ParamSpl itFrame/@g roupID}" d ocumentID= "{$ParamSp litFrame/@ documentID }" actionc hecksum="{ $GlobalAct ionChecksu m}">
479      <wwfile s:Depends  path="{$Pa ramDocumen tFile/@pat h}" checks um="{$Para mDocumentF ile/@check sum}" grou pID="{$Par amDocument File/@grou pID}" docu mentID="{$ ParamDocum entFile/@d ocumentID} " />   502      <wwfile s:Depends  path="{$Pa ramDocumen tFile/@pat h}" checks um="{$Para mDocumentF ile/@check sum}" grou pID="{$Par amDocument File/@grou pID}" docu mentID="{$ ParamDocum entFile/@d ocumentID} " />
480     </wwfile s:File>   503     </wwfile s:File>
481     504  
482     <!-- Abo rted? -->   505     <!-- Abo rted? -->
483     <!--           -->   506     <!--           -->
484     <xsl:if  test="not( wwprogress :Abort())" >   507     <xsl:if  test="not( wwprogress :Abort())" >
485      <!-- Ge t image-sc ale marker  -->   508      <!-- Ge t image-sc ale marker  -->
486      <!--                           -->   509      <!--                           -->
487      <xsl:va riable nam e="VarImag eScale">   510      <xsl:va riable nam e="VarImag eScale">
488       <xsl:c all-templa te name="I mages-Imag eScaleMark erValue">   511       <xsl:c all-templa te name="I mages-Imag eScaleMark erValue">
489        <xsl: with-param  name="Par amFrameBeh avior" sel ect="$Para mBehaviors Frame" />   512        <xsl: with-param  name="Par amFrameBeh avior" sel ect="$Para mBehaviors Frame" />
490       </xsl: call-templ ate>   513       </xsl: call-templ ate>
491      </xsl:v ariable>   514      </xsl:v ariable>
492     515  
493      <!-- Ge t graphic  options -- >   516      <!-- Ge t graphic  options -- >
494      <!--                       -- >   517      <!--                       -- >
495      <xsl:va riable nam e="VarScal eOption" s elect="$Pa ramContext Rule/wwpro ject:Optio ns/wwproje ct:Option[ @Name = 's cale']/@Va lue" />   518      <xsl:va riable nam e="VarScal eOption" s elect="$Pa ramContext Rule/wwpro ject:Optio ns/wwproje ct:Option[ @Name = 's cale']/@Va lue" />
496      <xsl:va riable nam e="VarMaxW idthOption ">   519      <xsl:va riable nam e="VarMaxW idthOption ">
497       <xsl:c all-templa te name="I mages-MaxS izeOption" >   520       <xsl:c all-templa te name="I mages-MaxS izeOption" >
498        <xsl: with-param  name="Par amMaxSizeO ptionValue " select=" $ParamCont extRule/ww project:Op tions/wwpr oject:Opti on[@Name =  'max-widt h']/@Value " />   521        <xsl: with-param  name="Par amMaxSizeO ptionValue " select=" $ParamCont extRule/ww project:Op tions/wwpr oject:Opti on[@Name =  'max-widt h']/@Value " />
499       </xsl: call-templ ate>   522       </xsl: call-templ ate>
500      </xsl:v ariable>   523      </xsl:v ariable>
501      <xsl:va riable nam e="VarMaxH eightOptio n">   524      <xsl:va riable nam e="VarMaxH eightOptio n">
502       <xsl:c all-templa te name="I mages-MaxS izeOption" >   525       <xsl:c all-templa te name="I mages-MaxS izeOption" >
503        <xsl: with-param  name="Par amMaxSizeO ptionValue " select=" $ParamCont extRule/ww project:Op tions/wwpr oject:Opti on[@Name =  'max-heig ht']/@Valu e" />   526        <xsl: with-param  name="Par amMaxSizeO ptionValue " select=" $ParamCont extRule/ww project:Op tions/wwpr oject:Opti on[@Name =  'max-heig ht']/@Valu e" />
504       </xsl: call-templ ate>   527       </xsl: call-templ ate>
505      </xsl:v ariable>   528      </xsl:v ariable>
506     529  
507      <!-- Ge nerate ima ge -->   530      <!-- Ge nerate ima ge -->
508      <!--                  -->   531      <!--                  -->
509      <xsl:va riable nam e="VarImag eUpToDate"  select="w wfilesext: UpToDate($ ParamSplit Frame/@pat h, concat( $GlobalPro ject/wwpro ject:Proje ct/@Change ID, ':', $ VarImageSc ale, ':',  $VarScaleO ption, ':' , $VarMaxW idthOption , ':', $Va rMaxHeight Option), $ ParamSplit Frame/@gro upID, $Par amSplitFra me/@docume ntID, $Glo balActionC hecksum)"  />   532      <xsl:va riable nam e="VarImag eUpToDate"  select="w wfilesext: UpToDate($ ParamSplit Frame/@pat h, concat( $GlobalPro ject/wwpro ject:Proje ct/@Change ID, ':', $ VarImageSc ale, ':',  $VarScaleO ption, ':' , $VarMaxW idthOption , ':', $Va rMaxHeight Option), $ ParamSplit Frame/@gro upID, $Par amSplitFra me/@docume ntID, $Glo balActionC hecksum)"  />
510      <xsl:if  test="not ($VarPostS criptUpToD ate) or no t($VarImag eUpToDate) ">   533      <xsl:if  test="not ($VarPostS criptUpToD ate) or no t($VarImag eUpToDate) ">
511       <!-- R asterize - ->   534       <!-- R asterize - ->
512       <!--            - ->   535       <!--            - ->
513       <xsl:v ariable na me="VarDoc umentFrame Width" sel ect="wwuni ts:Numeric Prefix($Pa ramDocumen tFrame/wwd oc:Attribu te[@name =  'width']/ @value)" / >   536       <xsl:v ariable na me="VarDoc umentFrame Width" sel ect="wwuni ts:Numeric Prefix($Pa ramDocumen tFrame/wwd oc:Attribu te[@name =  'width']/ @value)" / >
514       <xsl:v ariable na me="VarDoc umentFrame Height" se lect="wwun its:Numeri cPrefix($P aramDocume ntFrame/ww doc:Attrib ute[@name  = 'height' ]/@value)"  />   537       <xsl:v ariable na me="VarDoc umentFrame Height" se lect="wwun its:Numeri cPrefix($P aramDocume ntFrame/ww doc:Attrib ute[@name  = 'height' ]/@value)"  />
515       <xsl:i f test="($ VarDocumen tFrameWidt h &gt; 0)  and ($VarD ocumentFra meHeight & gt; 0)">   538       <xsl:i f test="($ VarDocumen tFrameWidt h &gt; 0)  and ($VarD ocumentFra meHeight & gt; 0)">
516        <!--  Render DPI  -->   539        <!--  Render DPI  -->
517        <!--              -->   540        <!--              -->
518        <xsl: variable n ame="VarRe nderDPI">   541        <xsl: variable n ame="VarRe nderDPI">
519         <xsl :variable  name="VarR enderDPIOp tion" sele ct="$Param ContextRul e/wwprojec t:Options/ wwproject: Option[@Na me = 'rend er-dpi']/@ Value" />   542         <xsl :variable  name="VarR enderDPIOp tion" sele ct="$Param ContextRul e/wwprojec t:Options/ wwproject: Option[@Na me = 'rend er-dpi']/@ Value" />
520         <xsl :choose>   543         <xsl :choose>
521          <xs l:when tes t="string- length($Va rRenderDPI Option) &g t; 0">   544          <xs l:when tes t="string- length($Va rRenderDPI Option) &g t; 0">
522           <x sl:value-o f select=" $VarRender DPIOption"  />   545           <x sl:value-o f select=" $VarRender DPIOption"  />
523          </x sl:when>   546          </x sl:when>
524     547  
525          <xs l:otherwis e>   548          <xs l:otherwis e>
526           <x sl:value-o f select=" 96" />   549           <x sl:value-o f select=" 96" />
527          </x sl:otherwi se>   550          </x sl:otherwi se>
528         </xs l:choose>   551         </xs l:choose>
529        </xsl :variable>   552        </xsl :variable>
530     553  
531        <!--  Width/Heig ht -->   554        <!--  Width/Heig ht -->
532        <!--                -->   555        <!--                -->
533        <xsl: variable n ame="VarWi dth" selec t="wwunits :Convert($ VarDocumen tFrameWidt h, 'points ', 'inches ') * $VarR enderDPI"  />   556        <xsl: variable n ame="VarWi dth" selec t="wwunits :Convert($ VarDocumen tFrameWidt h, 'points ', 'inches ') * $VarR enderDPI"  />
534        <xsl: variable n ame="VarHe ight" sele ct="wwunit s:Convert( $VarDocume ntFrameHei ght, 'poin ts', 'inch es') * $Va rRenderDPI " />   557        <xsl: variable n ame="VarHe ight" sele ct="wwunit s:Convert( $VarDocume ntFrameHei ght, 'poin ts', 'inch es') * $Va rRenderDPI " />
535     558  
536        <!--  Format -->   559        <!--  Format -->
537        <!--         -->   560        <!--         -->
538        <xsl: variable n ame="VarFo rmat">   561        <xsl: variable n ame="VarFo rmat">
539         <xsl :variable  name="VarF ormatOptio n" select= "$ParamCon textRule/w wproject:O ptions/wwp roject:Opt ion[@Name  = 'format' ]/@Value"  />   562         <xsl :variable  name="VarF ormatOptio n" select= "$ParamCon textRule/w wproject:O ptions/wwp roject:Opt ion[@Name  = 'format' ]/@Value"  />
540         <xsl :choose>   563         <xsl :choose>
541          <xs l:when tes t="string- length($Va rFormatOpt ion) &gt;  0">   564          <xs l:when tes t="string- length($Va rFormatOpt ion) &gt;  0">
542           <x sl:value-o f select=" $VarFormat Option" />   565           <x sl:value-o f select=" $VarFormat Option" />
543          </x sl:when>   566          </x sl:when>
544     567  
545          <xs l:otherwis e>   568          <xs l:otherwis e>
546           <x sl:value-o f select=" $Parameter DefaultFor mat" />   569           <x sl:value-o f select=" $Parameter DefaultFor mat" />
547          </x sl:otherwi se>   570          </x sl:otherwi se>
548         </xs l:choose>   571         </xs l:choose>
549        </xsl :variable>   572        </xsl :variable>
550     573  
551        <!--  Color Dept h -->   574        <!--  Color Dept h -->
552        <!--               -->   575        <!--               -->
553        <xsl: variable n ame="VarCo lorDepth">   576        <xsl: variable n ame="VarCo lorDepth">
554         <xsl :variable  name="VarC olorDepthO ption" sel ect="$Para mContextRu le/wwproje ct:Options /wwproject :Option[@N ame = 'col or-depth'] /@Value" / >   577         <xsl :variable  name="VarC olorDepthO ption" sel ect="$Para mContextRu le/wwproje ct:Options /wwproject :Option[@N ame = 'col or-depth'] /@Value" / >
555         <xsl :choose>   578         <xsl :choose>
556          <xs l:when tes t="number( $VarColorD epthOption ) &gt; 0">   579          <xs l:when tes t="number( $VarColorD epthOption ) &gt; 0">
557           <x sl:value-o f select=" $VarColorD epthOption " />   580           <x sl:value-o f select=" $VarColorD epthOption " />
558          </x sl:when>   581          </x sl:when>
559     582  
560          <xs l:otherwis e>   583          <xs l:otherwis e>
561           <x sl:value-o f select=" 256" />   584           <x sl:value-o f select=" 256" />
562          </x sl:otherwi se>   585          </x sl:otherwi se>
563         </xs l:choose>   586         </xs l:choose>
564        </xsl :variable>   587        </xsl :variable>
565     588  
566        <!--  Grayscale  -->   589        <!--  Grayscale  -->
567        <!--             -->   590        <!--             -->
568        <xsl: variable n ame="VarGr ayscaleOpt ion" selec t="$ParamC ontextRule /wwproject :Options/w wproject:O ption[@Nam e = 'grays cale']/@Va lue" />   591        <xsl: variable n ame="VarGr ayscaleOpt ion" selec t="$ParamC ontextRule /wwproject :Options/w wproject:O ption[@Nam e = 'grays cale']/@Va lue" />
569        <xsl: variable n ame="VarGr ayscale" s elect="$Va rGrayscale Option = ' true'" />   592        <xsl: variable n ame="VarGr ayscale" s elect="$Va rGrayscale Option = ' true'" />
570     593  
571        <!--  Transparen t -->   594        <!--  Transparen t -->
572        <!--               -->   595        <!--               -->
573        <xsl: variable n ame="VarTr ansparentO ption" sel ect="$Para mContextRu le/wwproje ct:Options /wwproject :Option[@N ame = 'tra nsparent'] /@Value" / >   596        <xsl: variable n ame="VarTr ansparentO ption" sel ect="$Para mContextRu le/wwproje ct:Options /wwproject :Option[@N ame = 'tra nsparent'] /@Value" / >
574        <xsl: variable n ame="VarTr ansparent"  select="$ VarTranspa rentOption  = 'true'"  />   597        <xsl: variable n ame="VarTr ansparent"  select="$ VarTranspa rentOption  = 'true'"  />
575     598  
576        <!--  Interlaced  (for GIFs ) -->   599        <!--  Interlaced  (for GIFs ) -->
577        <!--                          -->   600        <!--                          -->
578        <xsl: variable n ame="VarIn terlacedOp tion" sele ct="$Param ContextRul e/wwprojec t:Options/ wwproject: Option[@Na me = 'inte rlaced']/@ Value" />   601        <xsl: variable n ame="VarIn terlacedOp tion" sele ct="$Param ContextRul e/wwprojec t:Options/ wwproject: Option[@Na me = 'inte rlaced']/@ Value" />
579        <xsl: variable n ame="VarIn terlaced"  select="$V arInterlac edOption =  'true'" / >   602        <xsl: variable n ame="VarIn terlaced"  select="$V arInterlac edOption =  'true'" / >
580     603  
581        <!--  Quality (f or JPEGs)  -->   604        <!--  Quality (f or JPEGs)  -->
582        <!--                        -->   605        <!--                        -->
583        <xsl: variable n ame="VarQu ality">   606        <xsl: variable n ame="VarQu ality">
584         <xsl :variable  name="VarQ ualityOpti on" select ="$ParamCo ntextRule/ wwproject: Options/ww project:Op tion[@Name  = 'qualit y']/@Value " />   607         <xsl :variable  name="VarQ ualityOpti on" select ="$ParamCo ntextRule/ wwproject: Options/ww project:Op tion[@Name  = 'qualit y']/@Value " />
585     608  
586         <xsl :choose>   609         <xsl :choose>
587          <xs l:when tes t="number( $VarQualit yOption) & gt; 0">   610          <xs l:when tes t="number( $VarQualit yOption) & gt; 0">
588           <x sl:value-o f select=" $VarQualit yOption" / >   611           <x sl:value-o f select=" $VarQualit yOption" / >
589          </x sl:when>   612          </x sl:when>
590     613  
591          <xs l:otherwis e>   614          <xs l:otherwis e>
592           <x sl:value-o f select=" 75" />   615           <x sl:value-o f select=" 75" />
593          </x sl:otherwi se>   616          </x sl:otherwi se>
594         </xs l:choose>   617         </xs l:choose>
595        </xsl :variable>   618        </xsl :variable>
596     619  
597        <!--  Determine  scaling ra tio -->   620        <!--  Determine  scaling ra tio -->
598        <!--                            -->   621        <!--                            -->
599        <xsl: variable n ame="VarUp ScalingRat io">   622        <xsl: variable n ame="VarUp ScalingRat io">
600         <xsl :choose>   623         <xsl :choose>
601          <!- - Use imag e-scale ma rkers if d efined -->   624          <!- - Use imag e-scale ma rkers if d efined -->
602          <!- -                                       -->   625          <!- -                                       -->
603          <xs l:when tes t="string- length($Va rImageScal e) &gt; 0" >   626          <xs l:when tes t="string- length($Va rImageScal e) &gt; 0" >
604           <x sl:value-o f select=" $VarImageS cale div 1 00.0" />   627           <x sl:value-o f select=" $VarImageS cale div 1 00.0" />
605          </x sl:when>   628          </x sl:when>
606     629  
607          <!- - Scale -- >   630          <!- - Scale -- >
608          <!- -       -- >   631          <!- -       -- >
609          <xs l:when tes t="(string -length($V arScaleOpt ion) &gt;  0) and ($V arScaleOpt ion != 'no ne') and ( number($Va rScaleOpti on) &gt; 0 )">   632          <xs l:when tes t="(string -length($V arScaleOpt ion) &gt;  0) and ($V arScaleOpt ion != 'no ne') and ( number($Va rScaleOpti on) &gt; 0 )">
610           <x sl:value-o f select=" $VarScaleO ption div  100.0" />   633           <x sl:value-o f select=" $VarScaleO ption div  100.0" />
611          </x sl:when>   634          </x sl:when>
612     635  
613          <xs l:otherwis e>   636          <xs l:otherwis e>
614           <x sl:value-o f select=" 1.0" />   637           <x sl:value-o f select=" 1.0" />
615          </x sl:otherwi se>   638          </x sl:otherwi se>
616         </xs l:choose>   639         </xs l:choose>
617        </xsl :variable>   640        </xsl :variable>
618     641  
619        <!--  Record ups caling par ameters -- >   642        <!--  Record ups caling par ameters -- >
620        <!--                                -- >   643        <!--                                -- >
621        <xsl: variable n ame="VarSc aledRender DPI">   644        <xsl: variable n ame="VarSc aledRender DPI">
622         <xsl :choose>   645         <xsl :choose>
623          <xs l:when tes t="$VarUpS calingRati o &gt; 1.0 ">   646          <xs l:when tes t="$VarUpS calingRati o &gt; 1.0 ">
624           <x sl:value-o f select=" round($Var RenderDPI  * $VarUpSc alingRatio )" />   647           <x sl:value-o f select=" round($Var RenderDPI  * $VarUpSc alingRatio )" />
625          </x sl:when>   648          </x sl:when>
626     649  
627          <xs l:otherwis e>   650          <xs l:otherwis e>
628           <x sl:value-o f select=" $VarRender DPI" />   651           <x sl:value-o f select=" $VarRender DPI" />
629          </x sl:otherwi se>   652          </x sl:otherwi se>
630         </xs l:choose>   653         </xs l:choose>
631        </xsl :variable>   654        </xsl :variable>
632        <xsl: variable n ame="VarSc aledWidth" >   655        <xsl: variable n ame="VarSc aledWidth" >
633         <xsl :choose>   656         <xsl :choose>
634          <xs l:when tes t="$VarUpS calingRati o &gt; 1.0 ">   657          <xs l:when tes t="$VarUpS calingRati o &gt; 1.0 ">
635           <x sl:value-o f select=" ceiling($V arWidth *  $VarUpScal ingRatio)"  />   658           <x sl:value-o f select=" ceiling($V arWidth *  $VarUpScal ingRatio)"  />
636          </x sl:when>   659          </x sl:when>
637     660  
638          <xs l:otherwis e>   661          <xs l:otherwis e>
639           <x sl:value-o f select=" ceiling($V arWidth)"  />   662           <x sl:value-o f select=" ceiling($V arWidth)"  />
640          </x sl:otherwi se>   663          </x sl:otherwi se>
641         </xs l:choose>   664         </xs l:choose>
642        </xsl :variable>   665        </xsl :variable>
643        <xsl: variable n ame="VarSc aledHeight ">   666        <xsl: variable n ame="VarSc aledHeight ">
644         <xsl :choose>   667         <xsl :choose>
645          <xs l:when tes t="$VarUpS calingRati o &gt; 1.0 ">   668          <xs l:when tes t="$VarUpS calingRati o &gt; 1.0 ">
646           <x sl:value-o f select=" ceiling($V arHeight *  $VarUpSca lingRatio) " />   669           <x sl:value-o f select=" ceiling($V arHeight *  $VarUpSca lingRatio) " />
647          </x sl:when>   670          </x sl:when>
648     671  
649          <xs l:otherwis e>   672          <xs l:otherwis e>
650           <x sl:value-o f select=" ceiling($V arHeight)"  />   673           <x sl:value-o f select=" ceiling($V arHeight)"  />
651          </x sl:otherwi se>   674          </x sl:otherwi se>
652         </xs l:choose>   675         </xs l:choose>
653        </xsl :variable>   676        </xsl :variable>
654     677  
655        <!--  Rasterize  PostScript  -->   678        <!--  Rasterize  PostScript  -->
656        <!--                         -->   679        <!--                         -->
657        <xsl: variable n ame="VarAd apterName"  select="$ ParamDocum entFrame/w wdoc:Facet s/wwdoc:Fa cet[@type  = 'documen t']/wwdoc: Attribute[ @name = 'a dapter']/@ value" />   680        <xsl: variable n ame="VarAd apterName"  select="$ ParamDocum entFrame/w wdoc:Facet s/wwdoc:Fa cet[@type  = 'documen t']/wwdoc: Attribute[ @name = 'a dapter']/@ value" />
658        <xsl: variable n ame="VarIm ageInfo" s elect="wwi maging:Ras terizePost Script($Va rPostScrip tPath, $Va rScaledRen derDPI, $V arScaledRe nderDPI, $ VarScaledW idth, $Var ScaledHeig ht, $VarFo rmat, $Var ColorDepth , $VarGray scale, $Va rTranspare nt, $VarIn terlaced,  $VarQualit y, $ParamS plitFrame/ @path)" />   681        <xsl: variable n ame="VarIm ageInfo" s elect="wwi maging:Ras terizePost Script($Va rPostScrip tPath, $Va rScaledRen derDPI, $V arScaledRe nderDPI, $ VarScaledW idth, $Var ScaledHeig ht, $VarFo rmat, $Var ColorDepth , $VarGray scale, $Va rTranspare nt, $VarIn terlaced,  $VarQualit y, $ParamS plitFrame/ @path)" />
659        <xsl: if test="( number($Va rImageInfo /@width) & gt; 0) and  (number($ VarImageIn fo/@height ) &gt; 0)" >   682        <xsl: if test="( number($Va rImageInfo /@width) & gt; 0) and  (number($ VarImageIn fo/@height ) &gt; 0)" >
660         <!--  Determine  downscali ng ratio - ->   683         <!--  Determine  downscali ng ratio - ->
661         <!--                                - ->   684         <!--                                - ->
662         <xsl :variable  name="VarD ownScaling Ratio">   685         <xsl :variable  name="VarD ownScaling Ratio">
663          <xs l:choose>   686          <xs l:choose>
664           <! -- Use ima ge-scale m arkers if  defined -- >   687           <! -- Use ima ge-scale m arkers if  defined -- >
665           <! --                                       -- >   688           <! --                                       -- >
666           <x sl:when te st="string -length($V arImageSca le) &gt; 0 ">   689           <x sl:when te st="string -length($V arImageSca le) &gt; 0 ">
667            < xsl:value- of select= "$VarImage Scale div  100.0" />   690            < xsl:value- of select= "$VarImage Scale div  100.0" />
668           </ xsl:when>   691           </ xsl:when>
669     692  
670           <! -- Use gra phic optio ns -->   693           <! -- Use gra phic optio ns -->
671           <! --                       -->   694           <! --                       -->
672           <x sl:otherwi se>   695           <x sl:otherwi se>
673            < xsl:choose >   696            < xsl:choose >
674              <!-- Max W idth/Heigh t -->   697              <!-- Max W idth/Heigh t -->
675              <!--                    -->   698              <!--                    -->
676              <xsl:when  test="($Va rMaxWidthO ption &gt;  0) or ($V arMaxHeigh tOption &g t; 0)">   699              <xsl:when  test="($Va rMaxWidthO ption &gt;  0) or ($V arMaxHeigh tOption &g t; 0)">
677               <!-- Dete rmine scal ing ratio  -->   700               <!-- Dete rmine scal ing ratio  -->
678               <!--                            -->   701               <!--                            -->
679               <xsl:vari able name= "VarWidthR atio" sele ct="$VarMa xWidthOpti on div $Va rImageInfo /@width" / >   702               <xsl:vari able name= "VarWidthR atio" sele ct="$VarMa xWidthOpti on div $Va rImageInfo /@width" / >
680               <xsl:vari able name= "VarHeight Ratio" sel ect="$VarM axHeightOp tion div $ VarImageIn fo/@height " />   703               <xsl:vari able name= "VarHeight Ratio" sel ect="$VarM axHeightOp tion div $ VarImageIn fo/@height " />
681               <xsl:choo se>   704               <xsl:choo se>
682                <xsl:whe n test="(( $VarWidthR atio &gt;  0) and ($V arWidthRat io &lt; $V arHeightRa tio)) or ( $VarHeight Ratio = 0) ">   705                <xsl:whe n test="(( $VarWidthR atio &gt;  0) and ($V arWidthRat io &lt; $V arHeightRa tio)) or ( $VarHeight Ratio = 0) ">
683                 <xsl:va lue-of sel ect="$VarW idthRatio"  />   706                 <xsl:va lue-of sel ect="$VarW idthRatio"  />
684                </xsl:wh en>   707                </xsl:wh en>
685     708  
686                <xsl:oth erwise>   709                <xsl:oth erwise>
687                 <xsl:va lue-of sel ect="$VarH eightRatio " />   710                 <xsl:va lue-of sel ect="$VarH eightRatio " />
688                </xsl:ot herwise>   711                </xsl:ot herwise>
689               </xsl:cho ose>   712               </xsl:cho ose>
690              </xsl:when >   713              </xsl:when >
691     714  
692              <!-- Scale  -->   715              <!-- Scale  -->
693              <!--        -->   716              <!--        -->
694              <xsl:when  test="(str ing-length ($VarScale Option) &g t; 0) and  ($VarScale Option !=  'none') an d (number( $VarScaleO ption) &gt ; 0)">   717              <xsl:when  test="(str ing-length ($VarScale Option) &g t; 0) and  ($VarScale Option !=  'none') an d (number( $VarScaleO ption) &gt ; 0)">
695               <xsl:valu e-of selec t="$VarSca leOption d iv 100.0"  />   718               <xsl:valu e-of selec t="$VarSca leOption d iv 100.0"  />
696              </xsl:when >   719              </xsl:when >
697     720  
698              <xsl:other wise>   721              <xsl:other wise>
699               <xsl:valu e-of selec t="1.0" />   722               <xsl:valu e-of selec t="1.0" />
700              </xsl:othe rwise>   723              </xsl:othe rwise>
701            < /xsl:choos e>   724            < /xsl:choos e>
702           </ xsl:otherw ise>   725           </ xsl:otherw ise>
703          </x sl:choose>   726          </x sl:choose>
704         </xs l:variable >   727         </xs l:variable >
705     728  
706         <!--  Need to r esize? -->   729         <!--  Need to r esize? -->
707         <!--                   -->   730         <!--                   -->
708         <xsl :if test=" ($VarDownS calingRati o &gt; 0.0 ) and ($Va rDownScali ngRatio &l t; 1.0)">   731         <xsl :if test=" ($VarDownS calingRati o &gt; 0.0 ) and ($Va rDownScali ngRatio &l t; 1.0)">
709          <xs l:variable  name="Var ResizeWidt h" select= "ceiling($ VarImageIn fo/@width  * $VarDown ScalingRat io)" />   732          <xs l:variable  name="Var ResizeWidt h" select= "ceiling($ VarImageIn fo/@width  * $VarDown ScalingRat io)" />
710          <xs l:variable  name="Var ResizeHeig ht" select ="ceiling( $VarImageI nfo/@heigh t * $VarDo wnScalingR atio)" />   733          <xs l:variable  name="Var ResizeHeig ht" select ="ceiling( $VarImageI nfo/@heigh t * $VarDo wnScalingR atio)" />
711     734  
712          <xs l:variable  name="Var Transform"  select="w wimaging:T ransform($ ParamSplit Frame/@pat h, $VarIma geInfo/@fo rmat, $Var ResizeWidt h, $VarRes izeHeight,  $ParamSpl itFrame/@p ath)" />   735          <xs l:variable  name="Var Transform"  select="w wimaging:T ransform($ ParamSplit Frame/@pat h, $VarIma geInfo/@fo rmat, $Var ResizeWidt h, $VarRes izeHeight,  $ParamSpl itFrame/@p ath)" />
713         </xs l:if>   736         </xs l:if>
714        </xsl :if>   737        </xsl :if>
715       </xsl: if>   738       </xsl: if>
716      </xsl:i f>   739      </xsl:i f>
717     740  
718      <!-- De pendency i nfo -->   741      <!-- De pendency i nfo -->
719      <!--                   -->   742      <!--                   -->
720      <wwfile s:File pat h="{$Param SplitFrame /@path}" t ype="{$Par ameterType }" checksu m="{wwfile system:Get Checksum($ ParamSplit Frame/@pat h)}" proje ctchecksum ="{concat( $GlobalPro ject/wwpro ject:Proje ct/@Change ID, ':', $ VarImageSc ale, ':',  $VarScaleO ption, ':' , $VarMaxW idthOption , ':', $Va rMaxHeight Option)}"  groupID="{ $ParamSpli tFrame/@gr oupID}" do cumentID=" {$ParamSpl itFrame/@d ocumentID} " actionch ecksum="{$ GlobalActi onChecksum }" categor y="{$Param eterCatego ry}" use=" {$Paramete rUse}" dep loy="{$Par ameterDepl oy}">   743      <wwfile s:File pat h="{$Param SplitFrame /@path}" t ype="{$Par ameterType }" checksu m="{wwfile system:Get Checksum($ ParamSplit Frame/@pat h)}" proje ctchecksum ="{concat( $GlobalPro ject/wwpro ject:Proje ct/@Change ID, ':', $ VarImageSc ale, ':',  $VarScaleO ption, ':' , $VarMaxW idthOption , ':', $Va rMaxHeight Option)}"  groupID="{ $ParamSpli tFrame/@gr oupID}" do cumentID=" {$ParamSpl itFrame/@d ocumentID} " actionch ecksum="{$ GlobalActi onChecksum }" categor y="{$Param eterCatego ry}" use=" {$Paramete rUse}" dep loy="{$Par ameterDepl oy}">
721       <wwfil es:Depends  path="{$V arPostScri ptPath}" c hecksum="{ $VarPostSc riptChecks um}" group ID="{$Para mSplitFram e/@groupID }" documen tID="{$Par amSplitFra me/@docume ntID}" />   744       <wwfil es:Depends  path="{$V arPostScri ptPath}" c hecksum="{ $VarPostSc riptChecks um}" group ID="{$Para mSplitFram e/@groupID }" documen tID="{$Par amSplitFra me/@docume ntID}" />
722       <wwfil es:Depends  path="{$P aramBehavi orsFile/@p ath}" chec ksum="{$Pa ramBehavio rsFile/@ch ecksum}" g roupID="{$ ParamBehav iorsFile/@ groupID}"  documentID ="{$ParamB ehaviorsFi le/@docume ntID}" />   745       <wwfil es:Depends  path="{$P aramBehavi orsFile/@p ath}" chec ksum="{$Pa ramBehavio rsFile/@ch ecksum}" g roupID="{$ ParamBehav iorsFile/@ groupID}"  documentID ="{$ParamB ehaviorsFi le/@docume ntID}" />
723      </wwfil es:File>   746      </wwfil es:File>
724     </xsl:if >   747     </xsl:if >
725    </xsl:tem plate>   748    </xsl:tem plate>
726     749  
727     750  
728    <xsl:temp late name= "Thumbnail ">   751    <xsl:temp late name= "Thumbnail ">
729     <xsl:par am name="P aramDocume ntFrame" / >   752     <xsl:par am name="P aramDocume ntFrame" / >
730     <xsl:par am name="P aramBehavi orsFrame"  />   753     <xsl:par am name="P aramBehavi orsFrame"  />
731     <xsl:par am name="P aramSplitF rame" />   754     <xsl:par am name="P aramSplitF rame" />
732     <xsl:par am name="P aramContex tRule" />   755     <xsl:par am name="P aramContex tRule" />
733     756  
734     <!-- Det ermine thu mbnail wid th/height  limits -->   757     <!-- Det ermine thu mbnail wid th/height  limits -->
735     <!--                                             -->   758     <!--                                             -->
736     <xsl:var iable name ="VarThumb nailWidthO ption">   759     <xsl:var iable name ="VarThumb nailWidthO ption">
737      <xsl:ca ll-templat e name="Im ages-MaxSi zeOption">   760      <xsl:ca ll-templat e name="Im ages-MaxSi zeOption">
738       <xsl:w ith-param  name="Para mMaxSizeOp tionValue"  select="$ ParamConte xtRule/wwp roject:Opt ions/wwpro ject:Optio n[@Name =  'thumbnail -width']/@ Value" />   761       <xsl:w ith-param  name="Para mMaxSizeOp tionValue"  select="$ ParamConte xtRule/wwp roject:Opt ions/wwpro ject:Optio n[@Name =  'thumbnail -width']/@ Value" />
739      </xsl:c all-templa te>   762      </xsl:c all-templa te>
740     </xsl:va riable>   763     </xsl:va riable>
741     764  
742     <xsl:var iable name ="VarThumb nailHeight Option">   765     <xsl:var iable name ="VarThumb nailHeight Option">
743      <xsl:ca ll-templat e name="Im ages-MaxSi zeOption">   766      <xsl:ca ll-templat e name="Im ages-MaxSi zeOption">
744       <xsl:w ith-param  name="Para mMaxSizeOp tionValue"  select="$ ParamConte xtRule/wwp roject:Opt ions/wwpro ject:Optio n[@Name =  'thumbnail -height']/ @Value" />   767       <xsl:w ith-param  name="Para mMaxSizeOp tionValue"  select="$ ParamConte xtRule/wwp roject:Opt ions/wwpro ject:Optio n[@Name =  'thumbnail -height']/ @Value" />
745      </xsl:c all-templa te>   768      </xsl:c all-templa te>
746     </xsl:va riable>   769     </xsl:va riable>
747     770  
748     <xsl:if  test="($Va rThumbnail WidthOptio n &gt; 0)  or ($VarTh umbnailHei ghtOption  &gt; 0)">   771     <xsl:if  test="($Va rThumbnail WidthOptio n &gt; 0)  or ($VarTh umbnailHei ghtOption  &gt; 0)">
749      <!-- De termine so urce image  path -->   772      <!-- De termine so urce image  path -->
750      <!--                                -->   773      <!--                                -->
751      <xsl:va riable nam e="VarThum bnailSourc ePath">   774      <xsl:va riable nam e="VarThum bnailSourc ePath">
752       <xsl:v ariable na me="VarByR eference"  select="$P aramSplitF rame/@byre f = string (true())"  />   775       <xsl:v ariable na me="VarByR eference"  select="$P aramSplitF rame/@byre f = string (true())"  />
753       <xsl:c hoose>   776       <xsl:c hoose>
754        <!--  Thumbnails  may not h ave been c opied yet  -->   777        <!--  Thumbnails  may not h ave been c opied yet  -->
755        <!--                                              -->   778        <!--                                              -->
756        <xsl: when test= "$VarByRef erence">   779        <xsl: when test= "$VarByRef erence">
757         <xsl :value-of  select="$P aramSplitF rame/@sour ce" />   780         <xsl :value-of  select="$P aramSplitF rame/@sour ce" />
758        </xsl :when>   781        </xsl :when>
759     782  
760        <!--  Image exis ts because  it was ju st generat ed -->   783        <!--  Image exis ts because  it was ju st generat ed -->
761        <!--                                                 -->   784        <!--                                                 -->
762        <xsl: otherwise>   785        <xsl: otherwise>
763         <xsl :value-of  select="$P aramSplitF rame/@path " />   786         <xsl :value-of  select="$P aramSplitF rame/@path " />
764        </xsl :otherwise >   787        </xsl :otherwise >
765       </xsl: choose>   788       </xsl: choose>
766      </xsl:v ariable>   789      </xsl:v ariable>
767     790  
768      <!-- Ge t thumbnai l source i mage info  -->   791      <!-- Ge t thumbnai l source i mage info  -->
769      <!--                                     -->   792      <!--                                     -->
770      <xsl:va riable nam e="VarThum bnailSourc eImageInfo " select=" wwimaging: GetInfo($V arThumbnai lSourcePat h)" />   793      <xsl:va riable nam e="VarThum bnailSourc eImageInfo " select=" wwimaging: GetInfo($V arThumbnai lSourcePat h)" />
771     794  
772      <!-- Ra ster image  format? - ->   795      <!-- Ra ster image  format? - ->
773      <!--                        - ->   796      <!--                        - ->
774      <xsl:va riable nam e="VarRast erImageFor matAsText" >   797      <xsl:va riable nam e="VarRast erImageFor matAsText" >
775       <xsl:c all-templa te name="I mages-Rast erImageFor mat">   798       <xsl:c all-templa te name="I mages-Rast erImageFor mat">
776        <xsl: with-param  name="Par amImageInf o" select= "$VarThumb nailSource ImageInfo"  />   799        <xsl: with-param  name="Par amImageInf o" select= "$VarThumb nailSource ImageInfo"  />
777       </xsl: call-templ ate>   800       </xsl: call-templ ate>
778      </xsl:v ariable>   801      </xsl:v ariable>
779      <xsl:va riable nam e="VarRast erImageFor mat" selec t="$VarRas terImageFo rmatAsText  = string( true())" / >   802      <xsl:va riable nam e="VarRast erImageFor mat" selec t="$VarRas terImageFo rmatAsText  = string( true())" / >
780     803  
781      <!-- On ly process  raster im ages -->   804      <!-- On ly process  raster im ages -->
782      <!--                               -->   805      <!--                               -->
783      <xsl:if  test="$Va rRasterIma geFormat">   806      <xsl:if  test="$Va rRasterIma geFormat">
784       <!-- D etermine s caling rat io -->   807       <!-- D etermine s caling rat io -->
785       <!--                            -->   808       <!--                            -->
786       <xsl:v ariable na me="VarSca lingRatio" >   809       <xsl:v ariable na me="VarSca lingRatio" >
787        <xsl: variable n ame="VarWi dthRatio"  select="$V arThumbnai lWidthOpti on div $Va rThumbnail SourceImag eInfo/@wid th" />   810        <xsl: variable n ame="VarWi dthRatio"  select="$V arThumbnai lWidthOpti on div $Va rThumbnail SourceImag eInfo/@wid th" />
788        <xsl: variable n ame="VarHe ightRatio"  select="$ VarThumbna ilHeightOp tion div $ VarThumbna ilSourceIm ageInfo/@h eight" />   811        <xsl: variable n ame="VarHe ightRatio"  select="$ VarThumbna ilHeightOp tion div $ VarThumbna ilSourceIm ageInfo/@h eight" />
789     812  
790        <xsl: choose>   813        <xsl: choose>
791         <xsl :when test ="($VarWid thRatio &g t; 0) and  ($VarHeigh tRatio &gt ; 0)">   814         <xsl :when test ="($VarWid thRatio &g t; 0) and  ($VarHeigh tRatio &gt ; 0)">
792          <xs l:choose>   815          <xs l:choose>
793           <x sl:when te st="$VarWi dthRatio & lt; $VarHe ightRatio" >   816           <x sl:when te st="$VarWi dthRatio & lt; $VarHe ightRatio" >
794            < xsl:value- of select= "$VarWidth Ratio" />   817            < xsl:value- of select= "$VarWidth Ratio" />
795           </ xsl:when>   818           </ xsl:when>
796     819  
797           <x sl:otherwi se>   820           <x sl:otherwi se>
798            < xsl:value- of select= "$VarHeigh tRatio" />   821            < xsl:value- of select= "$VarHeigh tRatio" />
799           </ xsl:otherw ise>   822           </ xsl:otherw ise>
800          </x sl:choose>   823          </x sl:choose>
801         </xs l:when>   824         </xs l:when>
802     825  
803         <xsl :when test ="$VarWidt hRatio &gt ; 0">   826         <xsl :when test ="$VarWidt hRatio &gt ; 0">
804          <xs l:value-of  select="$ VarWidthRa tio" />   827          <xs l:value-of  select="$ VarWidthRa tio" />
805         </xs l:when>   828         </xs l:when>
806     829  
807         <xsl :when test ="$VarHeig htRatio &g t; 0">   830         <xsl :when test ="$VarHeig htRatio &g t; 0">
808          <xs l:value-of  select="$ VarHeightR atio" />   831          <xs l:value-of  select="$ VarHeightR atio" />
809         </xs l:when>   832         </xs l:when>
810     833  
811         <xsl :otherwise >   834         <xsl :otherwise >
812          <xs l:value-of  select="1 .0" />   835          <xs l:value-of  select="1 .0" />
813         </xs l:otherwis e>   836         </xs l:otherwis e>
814        </xsl :choose>   837        </xsl :choose>
815       </xsl: variable>   838       </xsl: variable>
816     839  
817       <!-- N eed thumbn ail? -->   840       <!-- N eed thumbn ail? -->
818       <!--                   -->   841       <!--                   -->
819       <xsl:i f test="($ VarScaling Ratio &gt;  0.0) and  ($VarScali ngRatio &l t; 1.0)">   842       <xsl:i f test="($ VarScaling Ratio &gt;  0.0) and  ($VarScali ngRatio &l t; 1.0)">
820        <!--  Thumbnail  up-to-date ? -->   843        <!--  Thumbnail  up-to-date ? -->
821        <!--                          -->   844        <!--                          -->
822        <xsl: variable n ame="VarTh umbnailPat h" select= "$ParamSpl itFrame/ww splits:Thu mbnail/@pa th" />   845        <xsl: variable n ame="VarTh umbnailPat h" select= "$ParamSpl itFrame/ww splits:Thu mbnail/@pa th" />
823        <xsl: variable n ame="VarTh umbnailUpT oDate" sel ect="wwfil esext:UpTo Date($VarT humbnailPa th, $Globa lProject/w wproject:P roject/@Ch angeID, $P aramSplitF rame/@grou pID, $Para mSplitFram e/@documen tID, $Glob alActionCh ecksum)" / >   846        <xsl: variable n ame="VarTh umbnailUpT oDate" sel ect="wwfil esext:UpTo Date($VarT humbnailPa th, $Globa lProject/w wproject:P roject/@Ch angeID, $P aramSplitF rame/@grou pID, $Para mSplitFram e/@documen tID, $Glob alActionCh ecksum)" / >
824        <xsl: if test="n ot($VarThu mbnailUpTo Date)">   847        <xsl: if test="n ot($VarThu mbnailUpTo Date)">
825         <xsl :variable  name="VarR esizeWidth " select=" ceiling($V arThumbnai lSourceIma geInfo/@wi dth * $Var ScalingRat io)" />   848         <xsl :variable  name="VarR esizeWidth " select=" ceiling($V arThumbnai lSourceIma geInfo/@wi dth * $Var ScalingRat io)" />
826         <xsl :variable  name="VarR esizeHeigh t" select= "ceiling($ VarThumbna ilSourceIm ageInfo/@h eight * $V arScalingR atio)" />   849         <xsl :variable  name="VarR esizeHeigh t" select= "ceiling($ VarThumbna ilSourceIm ageInfo/@h eight * $V arScalingR atio)" />
827     850  
828         <xsl :variable  name="VarT ransform"  select="ww imaging:Tr ansform($V arThumbnai lSourcePat h, $VarThu mbnailSour ceImageInf o/@format,  $VarResiz eWidth, $V arResizeHe ight, $Var ThumbnailP ath)" />   851         <xsl :variable  name="VarT ransform"  select="ww imaging:Tr ansform($V arThumbnai lSourcePat h, $VarThu mbnailSour ceImageInf o/@format,  $VarResiz eWidth, $V arResizeHe ight, $Var ThumbnailP ath)" />
829        </xsl :if>   852        </xsl :if>
830     853  
831        <!--  Track thum bnail file  -->   854        <!--  Track thum bnail file  -->
832        <!--                         -->   855        <!--                         -->
833        <wwfi les:File p ath="{$Var ThumbnailP ath}" type ="{$Parame terThumbna ilType}" c hecksum="{ wwfilesyst em:GetChec ksum($VarT humbnailPa th)}" proj ectchecksu m="{$Globa lProject/w wproject:P roject/@Ch angeID}" g roupID="{$ ParamSplit Frame/@gro upID}" doc umentID="{ $ParamSpli tFrame/@do cumentID}"  actionche cksum="{$G lobalActio nChecksum} " category ="" use=""  deploy="{ $Parameter Deploy}">   856        <wwfi les:File p ath="{$Var ThumbnailP ath}" type ="{$Parame terThumbna ilType}" c hecksum="{ wwfilesyst em:GetChec ksum($VarT humbnailPa th)}" proj ectchecksu m="{$Globa lProject/w wproject:P roject/@Ch angeID}" g roupID="{$ ParamSplit Frame/@gro upID}" doc umentID="{ $ParamSpli tFrame/@do cumentID}"  actionche cksum="{$G lobalActio nChecksum} " category ="" use=""  deploy="{ $Parameter Deploy}">
834         <wwf iles:Depen ds path="{ $VarThumbn ailSourceP ath}" chec ksum="{wwf ilesystem: GetChecksu m($VarThum bnailSourc ePath)}" g roupID="{$ ParamSplit Frame/@gro upID}" doc umentID="{ $ParamSpli tFrame/@do cumentID}"  />   857         <wwf iles:Depen ds path="{ $VarThumbn ailSourceP ath}" chec ksum="{wwf ilesystem: GetChecksu m($VarThum bnailSourc ePath)}" g roupID="{$ ParamSplit Frame/@gro upID}" doc umentID="{ $ParamSpli tFrame/@do cumentID}"  />
835        </wwf iles:File>   858        </wwf iles:File>
836       </xsl: if>   859       </xsl: if>
837      </xsl:i f>   860      </xsl:i f>
838     </xsl:if >   861     </xsl:if >
839    </xsl:tem plate>   862    </xsl:tem plate>
840   </xsl:styl esheet>   863   </xsl:styl esheet>