| 53 | | <xsl0:choose> |
| 54 | | <xsl0:when test="sm:link"><xsl0:for-each select="sm:link"><xsl0:call-template name="xLinkOptions"/></xsl0:for-each></xsl0:when> |
| 55 | | <xsl0:otherwise><xsl0:call-template name="xLinkOptions"/></xsl0:otherwise> |
| | 53 | <xsl0:param name="pWidthDefault"/> |
| | 54 | <xsl0:param name="pHeightDefault"/> |
| | 55 | <xsl0:choose> |
| | 56 | <xsl0:when test="sm:link"> |
| | 57 | <xsl0:for-each select="sm:link"> |
| | 58 | <xsl0:call-template name="xLinkOptions"> |
| | 59 | <xsl0:with-param name="pWidthDefault" select="$pWidthDefault"/> |
| | 60 | <xsl0:with-param name="pHeightDefault" select="$pHeightDefault"/> |
| | 61 | </xsl0:call-template> |
| | 62 | </xsl0:for-each> |
| | 63 | </xsl0:when> |
| | 64 | <xsl0:otherwise> |
| | 65 | <xsl0:call-template name="xLinkOptions"> |
| | 66 | <xsl0:with-param name="pWidthDefault" select="$pWidthDefault"/> |
| | 67 | <xsl0:with-param name="pHeightDefault" select="$pHeightDefault"/> |
| | 68 | </xsl0:call-template> |
| | 69 | </xsl0:otherwise> |
| | 70 | </xsl0:choose> |
| | 71 | </xsl0:template> |
| | 72 | |
| | 73 | <!-- linkOptionsXsl - production xsl (xsl0: et xsl:) --> |
| | 74 | <xsl0:template name="linkOptionsXsl"> |
| | 75 | <xsl0:param name="pWidthDefault"/> |
| | 76 | <xsl0:param name="pHeightDefault"/> |
| | 77 | <xsl0:choose> |
| | 78 | <xsl0:when test="sm:link"> |
| | 79 | <xsl0:for-each select="sm:link"> |
| | 80 | <xsl0:call-template name="xLinkOptionsXsl"> |
| | 81 | <xsl0:with-param name="pWidthDefault" select="$pWidthDefault"/> |
| | 82 | <xsl0:with-param name="pHeightDefault" select="$pHeightDefault"/> |
| | 83 | </xsl0:call-template> |
| | 84 | </xsl0:for-each> |
| | 85 | </xsl0:when> |
| | 86 | <xsl0:otherwise> |
| | 87 | <xsl0:call-template name="xLinkOptionsXsl"> |
| | 88 | <xsl0:with-param name="pWidthDefault" select="$pWidthDefault"/> |
| | 89 | <xsl0:with-param name="pHeightDefault" select="$pHeightDefault"/> |
| | 90 | </xsl0:call-template> |
| | 91 | </xsl0:otherwise> |
| 135 | | <xsl0:value-of select="si(sm:position/sm:centerScreen, concat('width=', sm:position/sm:centerScreen/@width, ',height=', sm:position/sm:centerScreen/@height, ',left="', '+(screen.availWidth-', sm:position/sm:centerScreen/@width, ')/2+",top="', '+(screen.availHeight-', sm:position/sm:centerScreen/@height, ')/2+",'),'')"/> |
| | 173 | <xsl0:if test="boolean(sm:position/sm:centerScreen)"> |
| | 174 | <xsl0:variable name="vWidth" select="si(boolean(sm:position/sm:centerScreen/@width), sm:position/sm:centerScreen/@width, si(string-length($pWidthDefault)=0, '800', $pWidthDefault))"/> |
| | 175 | <xsl0:variable name="vHeight" select="si(boolean(sm:position/sm:centerScreen/@height), sm:position/sm:centerScreen/@height, si(string-length($pHeightDefault)=0, '600', $pHeightDefault))"/> |
| | 176 | <xsl0:value-of select="concat('width=', $vWidth, ',height=', $vHeight, ',left="', '+(screen.availWidth-', $vWidth, ')/2+",top="', '+(screen.availHeight-', $vHeight, ')/2+",')"/> |
| | 177 | </xsl0:if> |
| | 178 | <xsl0:value-of select="si(sm:position/sm:maximized, concat('top=0,left=0,width=', ',width="', '+screen.availWidth', '+",height="', '+screen.availHeight', '+",'),'')"/> |
| | 179 | <xsl0:value-of select="si(sm:windowFeatures/@scrollbars, concat('scrollbars=', sm:windowFeatures/@scrollbars, ','), '')"/> |
| | 180 | <xsl0:value-of select="si(sm:windowFeatures/@resizable, concat('resizable=', sm:windowFeatures/@resizable, ','), '')"/> |
| | 181 | <xsl0:value-of select="si(sm:windowFeatures/@toolbar, concat('toolbar=', sm:windowFeatures/@toolbar, ','), '')"/> |
| | 182 | <xsl0:value-of select="si(sm:windowFeatures/@menubar, concat('menubar=', sm:windowFeatures/@menubar, ','), '')"/> |
| | 183 | <xsl0:value-of select="si(sm:windowFeatures/@location, concat('location=', sm:windowFeatures/@location, ','), '')"/> |
| | 184 | <xsl0:value-of select="si(sm:windowFeatures/@extraOptions, concat(sm:windowFeatures/@extraOptions, ','), '')"/> |
| | 185 | </xsl0:otherwise> |
| | 186 | </xsl0:choose> |
| | 187 | </xsl0:template> |
| | 188 | |
| | 189 | <!-- xLinkOptionsXsl --> |
| | 190 | <xsl0:template name="xLinkOptionsXsl"> |
| | 191 | <xsl0:param name="pWidthDefault"/> |
| | 192 | <xsl0:param name="pHeightDefault"/> |
| | 193 | <xsl0:choose> |
| | 194 | <xsl0:when test="@target='subWindow'"> |
| | 195 | <xsl0:value-of select="si(sm:position/sm:free/@width,concat('WIDTH:',sm:position/sm:free/@width,','),'')"/> |
| | 196 | <xsl0:value-of select="si(sm:position/sm:free/@height,concat('HEIGHT:',sm:position/sm:free/@height,','),'')"/> |
| | 197 | <xsl0:value-of select="si(sm:position/sm:free/@top,concat('TOP:',sm:position/sm:free/@top,','),'')"/> |
| | 198 | <xsl0:value-of select="si(sm:position/sm:free/@left,concat('LEFT:',sm:position/sm:free/@left,','),'')"/> |
| | 199 | <xsl0:value-of select="si(sm:position/sm:centerScreen,concat('CENTERSCREEN:true,WIDTH:',sm:position/sm:centerScreen/@width,',WIDTH:',sm:position/sm:centerScreen/@width,','),'')"/> |
| | 200 | <xsl0:value-of select="si(sm:position/sm:maximized,'MAXIMIZED:true,','')"/> |
| | 201 | <xsl0:value-of select="si(sm:windowFeatures/@scrollbars='no','SCROLLBARS:false,','SCROLLBARS:true,')"/> |
| | 202 | <xsl0:value-of select="si(sm:windowFeatures/@resizable='yes','RESIZEABLE:true,','RESIZEABLE:false,')"/> |
| | 203 | <xsl0:value-of select="si(sm:windowFeatures/@extraOptions, concat(sm:windowFeatures/@extraOptions, ','), '')"/> |
| | 204 | </xsl0:when> |
| | 205 | <xsl0:otherwise> |
| | 206 | <xsl0:value-of select="si(sm:position/sm:free/@width, concat('width=', sm:position/sm:free/@width, ','), '')"/> |
| | 207 | <xsl0:value-of select="si(sm:position/sm:free/@height, concat('height=', sm:position/sm:free/@height, ','), '')"/> |
| | 208 | <xsl0:value-of select="si(sm:position/sm:free/@top, concat('top=', sm:position/sm:free/@top, ','), '')"/> |
| | 209 | <xsl0:value-of select="si(sm:position/sm:free/@left, concat('left=', sm:position/sm:free/@left, ','), '')"/> |
| | 210 | <xsl0:if test="boolean(sm:position/sm:centerScreen)"> |
| | 211 | <xsl0:variable name="vWidth" select="si(boolean(sm:position/sm:centerScreen/@width), sm:position/sm:centerScreen/@width, $pWidthDefault)"/> |
| | 212 | <xsl0:variable name="vHeight" select="si(boolean(sm:position/sm:centerScreen/@height), sm:position/sm:centerScreen/@height, $pHeightDefault)"/> |
| | 213 | <xsl:variable name="vWidth"><xsl0:copy-of select="$vWidth"/></xsl:variable> |
| | 214 | <xsl:variable name="vHeight"><xsl0:copy-of select="$vHeight"/></xsl:variable> |
| | 215 | <xsl:value-of select="concat('width=', si($vWidth,$vWidth,'800'), ',height=', si($vHeight,$vHeight,'600'), ',left="', '+(screen.availWidth-', si($vWidth,$vWidth,'800'), ')/2+",top="', '+(screen.availHeight-', si($vHeight,$vHeight,'600'), ')/2+",')"/> |
| | 216 | </xsl0:if> |