Ignore:
Timestamp:
Jul 6, 2008, 6:57:34 AM (12 years ago)
Author:
julian.reschke@…
Message:

Update to latest version of rfc2629.xslt, and take advantage of it.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • rfc2629xslt/clean-for-DTD.xslt

    r246 r272  
    3434                xmlns:ed="http://greenbytes.de/2002/rfcedit"
    3535                xmlns:grddl="http://www.w3.org/2003/g/data-view#"
     36                xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    3637                xmlns:x="http://purl.org/net/xml2rfc/ext"
    3738                xmlns:xhtml="http://www.w3.org/1999/xhtml"
    38                 exclude-result-prefixes="ed grddl x xhtml"
     39                exclude-result-prefixes="ed grddl rdf x xhtml"
    3940>
    4041
     
    110111
    111112<!-- extensions -->
     113
     114<xsl:template match="x:abnf-char-sequence" mode="cleanup">
     115  <xsl:choose>
     116    <xsl:when test="substring(.,1,1) != '&quot;' or substring(.,string-length(.),1) != '&quot;'">
     117      <xsl:call-template name="error">
     118        <xsl:with-param name="msg" select="'contents of x:abnf-char-sequence needs to be quoted.'" />
     119      </xsl:call-template>
     120    </xsl:when>
     121    <xsl:otherwise>
     122      <xsl:text>%x</xsl:text>
     123      <xsl:call-template name="to-abnf-char-sequence">
     124        <xsl:with-param name="chars" select="substring(.,2,string-length(.)-2)"/>
     125      </xsl:call-template>
     126    </xsl:otherwise>
     127  </xsl:choose>
     128</xsl:template>
    112129
    113130<xsl:template match="x:anchor-alias" mode="cleanup"/>
     
    495512</xsl:template>
    496513
     514<!-- email repititions -->
     515<xsl:template match="email" mode="cleanup">
     516  <!-- combine in a single element -->
     517  <xsl:if test="not(preceding-sibling::email)">
     518    <email>
     519      <xsl:for-each select="../email">
     520        <xsl:value-of select="."/>
     521        <xsl:if test="position()!=last()">
     522          <xsl:text>, </xsl:text>
     523        </xsl:if>
     524      </xsl:for-each>
     525    </email>
     526  </xsl:if>
     527</xsl:template>
     528
    497529<!-- markup inside cref -->
    498530<xsl:template match="cref//eref" mode="cleanup">
     
    502534</xsl:template>
    503535
    504 
    505536<!-- artwork extensions -->
    506537<xsl:template match="artwork/@x:extraction-note" mode="cleanup"/>
     
    524555<xsl:template match="@grddl:transformation" mode="cleanup"/>
    525556
     557<!-- RDF info stripped -->
     558<xsl:template match="rdf:*" mode="cleanup"/>
     559
    526560</xsl:transform>
Note: See TracChangeset for help on using the changeset viewer.