source: draft-ietf-httpbis/latest/consistency-check.xslt @ 2666

Last change on this file since 2666 was 2588, checked in by julian.reschke@…, 6 years ago

add optional speck consistency check (not run for 'make all')

  • Property svn:executable set to *
File size: 1.5 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               xmlns:my="#my"
6               exclude-result-prefixes="rdf x"
7>
8
9<xsl:output method="text"/>
10
11<xsl:variable name="p2" select="document('p2-semantics.xml')"/>
12
13<xsl:template match="/">
14  <xsl:text>Header Field Categories</xsl:text>
15  <xsl:text>&#10;</xsl:text>
16  <xsl:text>&#10;</xsl:text>
17  <xsl:apply-templates select="//section[iref[contains(@item,' header field') and @primary='true']]">
18    <xsl:sort select="iref[contains(@item,' header field') and @primary='true']/@item"/>
19  </xsl:apply-templates>
20  <xsl:text>&#10;</xsl:text>
21  <xsl:text>&#10;</xsl:text>
22</xsl:template>
23
24<xsl:template match="section">
25  <xsl:variable name="name" select="@title"/>
26
27  <xsl:value-of select="$name"/>
28  <xsl:text>&#10;</xsl:text>
29 
30  <xsl:variable name="cat" select="$p2//section[texttable[ttcol='Defined in...' and c=$name]]"/>
31  <xsl:choose>
32    <xsl:when test="$cat">
33      <xsl:for-each select="$cat">
34        <xsl:text>-> </xsl:text>
35        <xsl:value-of select="@title"/>
36        <xsl:text>&#10;</xsl:text>
37      </xsl:for-each>
38    </xsl:when>
39    <xsl:otherwise>
40      <xsl:text>No category found in P2</xsl:text>
41      <xsl:text>&#10;</xsl:text>
42    </xsl:otherwise>
43  </xsl:choose>
44 
45  <xsl:text>&#10;</xsl:text>
46</xsl:template>
47
48</xsl:transform>
Note: See TracBrowser for help on using the repository browser.