Changeset 189 for rfc2629xslt/rfc2629toXHTML.xslt
- Timestamp:
- 03/02/08 14:58:34 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
rfc2629xslt/rfc2629toXHTML.xslt
r118 r189 501 501 <div xmlns="http://www.w3.org/1999/xhtml" id="{$anch}"/> 502 502 <xsl:apply-templates/> 503 <xsl:if test=" @title!='' or @anchor!=''">504 <xsl:variable name="n"><xsl:number level="any" count="figure[ @title!='' or @anchor!='']"/></xsl:variable>503 <xsl:if test="(@title!='' or @anchor!='') and not(@suppress-title='true')"> 504 <xsl:variable name="n"><xsl:number level="any" count="figure[(@title!='' or @anchor!='') and not(@suppress-title='true')]"/></xsl:variable> 505 505 <p xmlns="http://www.w3.org/1999/xhtml" class="figure">Figure <xsl:value-of select="$n"/><xsl:if test="@title!=''">: <xsl:value-of select="@title"/></xsl:if></p> 506 506 </xsl:if> … … 623 623 <xsl:otherwise> 624 624 <xsl:value-of select="$anchor-prefix"/>.iref.<xsl:number level="any" count="iref[translate(substring(@item,1,1),concat($lcase,$ucase),'')='']"/> 625 </xsl:otherwise> 626 </xsl:choose> 627 </xsl:template> 628 629 <xsl:template name="compute-extref-anchor"> 630 <xsl:variable name="first" select="translate(substring(.,1,1),$ucase,$lcase)"/> 631 <xsl:variable name="nkey" select="translate($first,$lcase,'')"/> 632 <xsl:choose> 633 <xsl:when test="$nkey=''"> 634 <xsl:value-of select="$anchor-prefix"/>.extref.<xsl:value-of select="$first"/>.<xsl:number level="any" count="x:ref[starts-with(translate(.,$ucase,$lcase),$first)]"/> 635 </xsl:when> 636 <xsl:otherwise> 637 <xsl:value-of select="$anchor-prefix"/>.extref.<xsl:number level="any" count="x:ref[translate(substring(.,1,1),concat($lcase,$ucase),'')='']"/> 625 638 </xsl:otherwise> 626 639 </xsl:choose> … … 1594 1607 <xsl:variable name="figcnt"> 1595 1608 <xsl:for-each select="$node"> 1596 <xsl:number level="any" count="figure[ @title!='' or @anchor!='']"/>1609 <xsl:number level="any" count="figure[(@title!='' or @anchor!='') and not(@suppress-title='true')]"/> 1597 1610 </xsl:for-each> 1598 1611 </xsl:variable> … … 1616 1629 <xsl:variable name="tabcnt"> 1617 1630 <xsl:for-each select="$node"> 1618 <xsl:number level="any" count="texttable[ @title!='' or @anchor!='']"/>1631 <xsl:number level="any" count="texttable[(@title!='' or @anchor!='') and not(@suppress-title='true')]"/> 1619 1632 </xsl:for-each> 1620 1633 </xsl:variable> … … 2727 2740 <xsl:call-template name="compute-iref-anchor"/> 2728 2741 </xsl:when> 2742 <xsl:when test="self::x:ref"> 2743 <xsl:text>#</xsl:text> 2744 <xsl:call-template name="compute-extref-anchor"/> 2745 </xsl:when> 2729 2746 <xsl:otherwise> 2730 2747 <xsl:message>Unsupported element type for insertSingleIref</xsl:message> … … 2950 2967 <xsl:variable name="irefs3" select="key('index-item',@item)[not(@subitem) or @subitem='']"/> 2951 2968 <xsl:variable name="xrefs3" select="//xref[@target=$irefs3[@x:for-anchor='']/../@anchor or @target=$irefs3/@x:for-anchor]"/> 2952 2953 <xsl:for-each select="$irefs3|$xrefs3"> 2969 <xsl:variable name="extrefs3" select="//x:ref[.=$irefs3[@x:for-anchor='']/../@anchor or .=$irefs3/@x:for-anchor]"/> 2970 2971 <xsl:for-each select="$irefs3|$xrefs3|$extrefs3"> 2954 2972 <!-- <xsl:sort select="translate(@item,$lcase,$ucase)" /> --> 2955 2973 <xsl:call-template name="insertSingleIref"/> … … 2981 2999 <xsl:variable name="irefs4" select="key('index-item-subitem',concat(@item,'..',@subitem))"/> 2982 3000 <xsl:variable name="xrefs4" select="//xref[@target=$irefs4[@x:for-anchor='']/../@anchor or @target=$irefs4/@x:for-anchor]"/> 2983 2984 <xsl:for-each select="$irefs4|$xrefs4"> 3001 <xsl:variable name="extrefs4" select="//x:ref[.=$irefs4[@x:for-anchor='']/../@anchor or .=$irefs4/@x:for-anchor]"/> 3002 3003 <xsl:for-each select="$irefs4|$xrefs4|$extrefs4"> 2985 3004 <!--<xsl:sort select="translate(@item,$lcase,$ucase)" />--> 2986 3005 <xsl:call-template name="insertSingleIref"/> … … 3616 3635 <xsl:variable name="val" select="."/> 3617 3636 <xsl:variable name="target" select="//*[(@anchor and x:anchor-alias/@value=$val) or (@anchor and ed:replace/ed:ins/x:anchor-alias/@value=$val) or (@anchor=$val)]"/> 3637 <xsl:variable name="irefs" select="//iref[@x:for-anchor=$val]"/> 3618 3638 <xsl:choose> 3619 3639 <xsl:when test="$target"> 3620 <a xmlns="http://www.w3.org/1999/xhtml" href="#{$target/@anchor}" class="smpl"><xsl:value-of select="."/></a> 3640 <a xmlns="http://www.w3.org/1999/xhtml" href="#{$target/@anchor}" class="smpl"> 3641 <!-- to be indexed? --> 3642 <xsl:if test="$irefs"> 3643 <xsl:attribute name="id"><xsl:call-template name="compute-extref-anchor"/></xsl:attribute> 3644 </xsl:if> 3645 <xsl:value-of select="."/> 3646 </a> 3621 3647 </xsl:when> 3622 3648 <xsl:otherwise> … … 4282 4308 <xsl:apply-templates select="postamble"/> 4283 4309 4284 <xsl:if test=" @title!='' or @anchor!=''">4285 <xsl:variable name="n"><xsl:number level="any" count="texttable[ @title!='' or @anchor!='']"/></xsl:variable>4310 <xsl:if test="(@title!='' or @anchor!='') and not(@suppress-title='true')"> 4311 <xsl:variable name="n"><xsl:number level="any" count="texttable[(@title!='' or @anchor!='') and not(@suppress-title='true')]"/></xsl:variable> 4286 4312 <p class="figure">Table <xsl:value-of select="$n"/><xsl:if test="@title!=''">: <xsl:value-of select="@title"/></xsl:if></p> 4287 4313 </xsl:if> … … 4489 4515 <xsl:text>http://greenbytes.de/tech/webdav/rfc2629.xslt, </xsl:text> 4490 4516 <!-- when RCS keyword substitution in place, add version info --> 4491 <xsl:if test="contains('$Revision: 1.35 4$',':')">4492 <xsl:value-of select="concat('Revision ',normalize-space(translate(substring-after('$Revision: 1.35 4$', 'Revision: '),'$','')),', ')"/>4517 <xsl:if test="contains('$Revision: 1.356 $',':')"> 4518 <xsl:value-of select="concat('Revision ',normalize-space(translate(substring-after('$Revision: 1.356 $', 'Revision: '),'$','')),', ')"/> 4493 4519 </xsl:if> 4494 <xsl:if test="contains('$Date: 200 7/12/31 13:43:05$',':')">4495 <xsl:value-of select="concat(normalize-space(translate(substring-after('$Date: 200 7/12/31 13:43:05$', 'Date: '),'$','')),', ')"/>4520 <xsl:if test="contains('$Date: 2008/02/03 13:29:11 $',':')"> 4521 <xsl:value-of select="concat(normalize-space(translate(substring-after('$Date: 2008/02/03 13:29:11 $', 'Date: '),'$','')),', ')"/> 4496 4522 </xsl:if> 4497 4523 <xsl:value-of select="concat('XSLT vendor: ',system-property('xsl:vendor'),' ',system-property('xsl:vendor-url'))"/>
Note: See TracChangeset
for help on using the changeset viewer.