Ignore:
Timestamp:
Jul 18, 2008, 3:37:21 AM (11 years ago)
Author:
julian.reschke@…
Message:

Upgrade to latest version of rfc2629.xslt

File:
1 edited

Legend:

Unmodified
Added
Removed
  • rfc2629xslt/rfc2629toXHTML.xslt

    r272 r285  
    11<?xml version="1.0" encoding="ISO-8859-1"?>
    22<!--Auto-generated from rfc2629.xslt through HTMLtoXHTML.xslt-->
    3 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ed="http://greenbytes.de/2002/rfcedit" xmlns:date="http://exslt.org/dates-and-times" xmlns:exslt="http://exslt.org/common" xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:myns="mailto:julian.reschke@greenbytes.de?subject=rcf2629.xslt" xmlns:saxon-old="http://icl.com/saxon" xmlns:saxon="http://saxon.sf.net/" xmlns:x="http://purl.org/net/xml2rfc/ext" xmlns:xhtml="http://www.w3.org/1999/xhtml" version="1.0" exclude-result-prefixes="date ed exslt msxsl myns saxon saxon-old x xhtml">
     3<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ed="http://greenbytes.de/2002/rfcedit" xmlns:date="http://exslt.org/dates-and-times" xmlns:exslt="http://exslt.org/common" xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:myns="mailto:julian.reschke@greenbytes.de?subject=rcf2629.xslt" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:saxon-old="http://icl.com/saxon" xmlns:saxon="http://saxon.sf.net/" xmlns:x="http://purl.org/net/xml2rfc/ext" xmlns:xhtml="http://www.w3.org/1999/xhtml" version="1.0" exclude-result-prefixes="date ed exslt msxsl myns rdf saxon saxon-old x xhtml">
    44
    55<xsl:strip-space elements="back front list middle rfc section"/>               
     
    447447        </span>
    448448      </xsl:for-each>
    449       <xsl:if test="address/uri">
     449      <xsl:for-each select="address/uri">
     450        <xsl:variable name="uri">
     451          <xsl:call-template name="extract-uri"/>
     452        </xsl:variable>
     453
    450454        <span class="vcardline">
    451455          <xsl:text>URI: </xsl:text>
    452           <a href="{address/uri}" class="url"><xsl:value-of select="address/uri"/></a>
     456          <a href="{$uri}" class="url"><xsl:value-of select="$uri"/></a>
    453457        </span>
    454       </xsl:if>
     458      </xsl:for-each>
    455459    </address>
    456460
     
    38153819<xsl:template match="x:dfn">
    38163820  <dfn xmlns="http://www.w3.org/1999/xhtml">
     3821    <xsl:if test="@anchor">
     3822      <xsl:attribute name="id"><xsl:value-of select="@anchor"/></xsl:attribute>
     3823    </xsl:if>
    38173824    <xsl:apply-templates/>
    38183825  </dfn>
     
    38603867  <xsl:apply-templates/>
    38613868</xsl:template>
     3869
     3870<xsl:template match="x:parse-xml">
     3871  <xsl:apply-templates/>
     3872
     3873  <xsl:if test="function-available('exslt:node-set')">
     3874    <xsl:variable name="cleaned">
     3875      <xsl:apply-templates mode="cleanup-edits"/>
     3876    </xsl:variable>
     3877    <xsl:choose>
     3878      <xsl:when test="function-available('myns:parseXml')">
     3879        <xsl:if test="myns:parseXml(concat($cleaned,''))!=''">
     3880          <xsl:call-template name="error">
     3881            <xsl:with-param name="msg" select="concat('Parse error in XML: ', myns:parseXml(concat($cleaned,'')))"/>
     3882          </xsl:call-template>
     3883        </xsl:if>
     3884      </xsl:when>
     3885      <xsl:when test="function-available('saxon:parse')">
     3886        <xsl:variable name="parsed" select="saxon:parse(concat($cleaned,''))"/>
     3887        <xsl:if test="$parsed='foo'">
     3888          <xsl:comment>should not get here</xsl:comment>
     3889        </xsl:if>
     3890      </xsl:when>
     3891      <xsl:otherwise/>
     3892    </xsl:choose>
     3893  </xsl:if>
     3894</xsl:template>
     3895
     3896<!-- inlined RDF support -->
     3897<xsl:template match="rdf:Description">
     3898  <!-- ignore -->
     3899</xsl:template>
     3900
     3901<!-- cleanup for ins/del -->
     3902
     3903<xsl:template match="comment()|@*" mode="cleanup-edits"><xsl:copy/></xsl:template>
     3904
     3905<xsl:template match="text()" mode="cleanup-edits"><xsl:copy/></xsl:template>
     3906
     3907<xsl:template match="/" mode="cleanup-edits">
     3908        <xsl:copy><xsl:apply-templates select="node()" mode="cleanup-edits"/></xsl:copy>
     3909</xsl:template>
     3910
     3911<xsl:template match="ed:del" mode="cleanup-edits"/>
     3912
     3913<xsl:template match="ed:replace" mode="cleanup-edits">
     3914  <xsl:apply-templates mode="cleanup-edits"/>
     3915</xsl:template>
     3916
     3917<xsl:template match="ed:ins" mode="cleanup-edits">
     3918  <xsl:apply-templates mode="cleanup-edits"/>
     3919</xsl:template>
     3920
    38623921
    38633922<!-- ABNF support -->
     
    44784537  <xsl:param name="msg2"/>
    44794538  <xsl:param name="inline"/>
    4480   <xsl:if test="$inline='no'">
     4539  <xsl:if test="$inline!='no'">
    44814540    <div xmlns="http://www.w3.org/1999/xhtml" class="error">ERROR: <xsl:value-of select="$msg"/><xsl:value-of select="$msg2"/></div>
    44824541  </xsl:if>
     
    47494808    <xsl:text>http://greenbytes.de/tech/webdav/rfc2629.xslt, </xsl:text>
    47504809    <!-- when RCS keyword substitution in place, add version info -->
    4751     <xsl:if test="contains('$Revision: 1.379 $',':')">
    4752       <xsl:value-of select="concat('Revision ',normalize-space(translate(substring-after('$Revision: 1.379 $', 'Revision: '),'$','')),', ')"/>
     4810    <xsl:if test="contains('$Revision: 1.384 $',':')">
     4811      <xsl:value-of select="concat('Revision ',normalize-space(translate(substring-after('$Revision: 1.384 $', 'Revision: '),'$','')),', ')"/>
    47534812    </xsl:if>
    4754     <xsl:if test="contains('$Date: 2008-07-06 13:38:32 $',':')">
    4755       <xsl:value-of select="concat(normalize-space(translate(substring-after('$Date: 2008-07-06 13:38:32 $', 'Date: '),'$','')),', ')"/>
     4813    <xsl:if test="contains('$Date: 2008-07-18 10:33:47 $',':')">
     4814      <xsl:value-of select="concat(normalize-space(translate(substring-after('$Date: 2008-07-18 10:33:47 $', 'Date: '),'$','')),', ')"/>
    47564815    </xsl:if>
    47574816    <xsl:value-of select="concat('XSLT vendor: ',system-property('xsl:vendor'),' ',system-property('xsl:vendor-url'))"/>
     
    48154874          </xsl:for-each>
    48164875        </xsl:when>
     4876        <xsl:when test="ancestor::reference">
     4877          <xsl:for-each select="ancestor::reference">
     4878            <xsl:call-template name="get-section-number"/>
     4879          </xsl:for-each>
     4880        </xsl:when>
    48174881        <xsl:when test="ancestor::back"><xsl:number count="section|appendix" level="multiple" format="A.1.1.1.1.1.1.1"/></xsl:when>
    48184882        <xsl:when test="self::appendix"><xsl:number count="appendix" level="multiple" format="A.1.1.1.1.1.1.1"/></xsl:when>
     
    49074971 
    49084972  <xsl:value-of select="$email2"/>
     4973</xsl:template>
     4974
     4975<!-- checking for uri element -->
     4976<xsl:template name="extract-uri">
     4977  <xsl:variable name="uri" select="normalize-space(.)"/>
     4978  <xsl:if test="string-length(.) != string-length($uri) or contains($uri,' ')">
     4979    <xsl:call-template name="warning">
     4980      <xsl:with-param name="inline" select="'no'"/>
     4981      <xsl:with-param name="msg">excessive whitespace in URI: '<xsl:value-of select="."/>'</xsl:with-param>
     4982    </xsl:call-template>
     4983  </xsl:if>
     4984 
     4985  <xsl:value-of select="$uri"/>
    49094986</xsl:template>
    49104987
Note: See TracChangeset for help on using the changeset viewer.