Ignore:
Timestamp:
13/09/13 11:47:00 (7 years ago)
Author:
fielding@…
Message:

Reduce the burden of processing warn-date to recipients that do something with Warning fields; use warn-code section titles to demonstrate syntax examples (and differentiate from status codes); clarify tortured wording around Age; demonstrate 4am mastery of xslt; addresses #486

File:
1 edited

Legend:

Unmodified
Added
Removed
  • draft-ietf-httpbis/latest/extract-warn-code-defs.xslt

    r1897 r2384  
    1616      <ttcol>Short Description</ttcol>
    1717      <ttcol>Reference</ttcol>
    18       <xsl:apply-templates select="//section[iref[contains(@item,' (warn code)') and @primary='true']]">
    19         <xsl:sort select="iref[contains(@item,' (warn code)') and @primary='true']/@item"/>
     18      <xsl:apply-templates select="//section[iref[contains(@item,' (warn-code)') and @primary='true']]">
     19        <xsl:sort select="iref[contains(@item,' (warn-code)') and @primary='true']/@item"/>
    2020      </xsl:apply-templates>
    2121    </texttable>
     
    7676
    7777<xsl:template match="section">
    78   <xsl:variable name="t" select="iref[contains(@item,'(warn code)')]/@item"/>
    79   <xsl:variable name="text" select="substring-before($t,' (warn code)')"/>
     78  <xsl:variable name="c" select="iref[contains(@item,'(warn-code)')]/@item"/>
     79  <xsl:variable name="code" select="substring-before($c,' (warn-code)')"/>
     80  <xsl:variable name="t" select="iref[contains(@item,'(warn-text)')]/@item"/>
     81  <xsl:variable name="text" select="substring-before($t,' (warn-text)')"/>
    8082  <xsl:variable name="redirects-to-other-part" xmlns:p2="urn:ietf:id:draft-ietf-httpbis-p2-semantics#" select="rdf:Description/p2:redirects-to"/>
    8183
    8284  <xsl:if test="not($redirects-to-other-part)">
    8385    <xsl:text>&#10;</xsl:text>
    84     <c><xsl:value-of select="substring-before($text,' ')"/></c>
    85     <c><xsl:value-of select="substring($text,2+string-length(substring-before($text,' ')))"/></c>
     86    <c><xsl:value-of select="$code"/></c>
     87    <c><xsl:value-of select="$text"/></c>
    8688    <c><xref target="{@anchor}"/></c>
    8789  </xsl:if>
Note: See TracChangeset for help on using the changeset viewer.