Ignore:
Timestamp:
Jul 19, 2008, 2:30:39 AM (11 years ago)
Author:
julian.reschke@…
Message:

Add checking of consistency of auto-generated tables (related to #72)

File:
1 edited

Legend:

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

    r286 r288  
    33               xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#'
    44               version="1.0"
     5               exclude-result-prefixes="rdf x"
    56>
    67
     
    89
    910<xsl:template match="/">
     11  <xsl:variable name="table">
     12    <texttable align="left" suppress-title="true" anchor="iana.method.registration.table">
     13      <ttcol>Method</ttcol>
     14      <ttcol>Safe</ttcol>
     15      <ttcol>Reference</ttcol>
     16      <xsl:apply-templates select="//section[iref/@item='Methods']">
     17        <xsl:sort select="iref[@item='Methods']/@subitem"/>
     18      </xsl:apply-templates>
     19    </texttable>
     20    <xsl:text>&#10;</xsl:text>
     21  </xsl:variable>
     22
    1023  <xsl:comment>AUTOGENERATED FROM extract-method-defs.xslt, do not edit manually</xsl:comment>
    1124  <xsl:text>&#10;</xsl:text>
    12   <xsl:comment>(START)</xsl:comment>
     25  <xsl:copy-of select="$table"/>
     26  <xsl:comment>(END)</xsl:comment>
    1327  <xsl:text>&#10;</xsl:text>
    14   <t>
    15     The HTTP Method Registry located at <eref target="http://www.iana.org/assignments/http-methods"/>
    16     should be populated with the registrations below:
    17   </t>
    18   <texttable align="left">
    19     <ttcol>Method</ttcol>
    20     <ttcol>Safe</ttcol>
    21     <ttcol>Reference</ttcol>
    22     <xsl:apply-templates select="//section[iref/@item='Methods']">
    23       <xsl:sort select="iref[@item='Methods']/@subitem"/>
    24     </xsl:apply-templates>
    25   </texttable>
    26   <t>
    27   </t>
    28   <xsl:text>&#10;</xsl:text>
    29   <xsl:comment>(END)</xsl:comment>
     28 
     29  <!-- check against current version -->
     30  <xsl:variable name="oldtable" select="//texttable[@anchor='iana.method.registration.table']" />
     31
     32  <xsl:if test="string($table//ttcol | $table//c) != string($oldtable//ttcol | $oldtable//c)">
     33    <xsl:message>WARNING: table contained inside source document needs to be updated!</xsl:message>
     34  </xsl:if>
     35 
    3036</xsl:template>
    3137
Note: See TracChangeset for help on using the changeset viewer.