source: draft-ietf-httpbis/latest/extract-method-defs.xslt @ 286

Last change on this file since 286 was 286, checked in by julian.reschke@…, 11 years ago

Added safeness to method registration "template" (related to #72)

  • Property svn:executable set to *
File size: 1.6 KB
Line 
1<xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
2               xmlns:x="http://purl.org/net/xml2rfc/ext"
3               xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#'
4               version="1.0"
5>
6
7<xsl:output indent="yes" omit-xml-declaration="yes"/>
8
9<xsl:template match="/">
10  <xsl:comment>AUTOGENERATED FROM extract-method-defs.xslt, do not edit manually</xsl:comment>
11  <xsl:text>&#10;</xsl:text>
12  <xsl:comment>(START)</xsl:comment>
13  <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>
30</xsl:template>
31
32<xsl:template match="section">
33
34  <xsl:variable name="text" select="iref[@item='Methods']/@subitem"/>
35
36  <xsl:variable name="safe" xmlns:p2="urn:ietf:id:draft-ietf-httpbis-p2-semantics#">
37    <xsl:choose>
38      <xsl:when test="rdf:Description/p2:safe='yes'">yes</xsl:when>
39      <xsl:otherwise>no</xsl:otherwise>
40    </xsl:choose>
41  </xsl:variable>
42
43  <xsl:text>&#10;</xsl:text>
44  <c><xsl:value-of select="$text"/></c>
45  <c><xsl:value-of select="$safe"/></c>
46  <c><xref target="{@anchor}"/></c>
47</xsl:template>
48
49</xsl:transform>
Note: See TracBrowser for help on using the repository browser.