Last change
on this file since 425 was
425,
checked in by julian.reschke@…, 14 years ago
|
reference RFC5234 core rules directly, fix line end bug in appendix generation (related to #36)
|
File size:
1.1 KB
|
Line | |
---|
1 | <xsl:transform
|
---|
2 | xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
---|
3 | version="2.0">
|
---|
4 |
|
---|
5 | <xsl:output method="xml" omit-xml-declaration="yes" indent="yes"/>
|
---|
6 |
|
---|
7 | <xsl:param name="abnf"/>
|
---|
8 |
|
---|
9 | <xsl:template match="/">
|
---|
10 | <xsl:variable name="collected" select="unparsed-text($abnf)"/>
|
---|
11 |
|
---|
12 | <section title="Collected ABNF" anchor="collected.abnf">
|
---|
13 | <figure>
|
---|
14 | <artwork type="abnf" name="{$abnf}">
|
---|
15 | <xsl:text> </xsl:text>
|
---|
16 | <xsl:value-of select="translate($collected,' ','')"/>
|
---|
17 | </artwork>
|
---|
18 | </figure>
|
---|
19 | </section>
|
---|
20 |
|
---|
21 | <!-- check whether it's up-to-date... -->
|
---|
22 |
|
---|
23 | <xsl:if test="not(//section[@anchor='collected.abnf']) or normalize-space(//section[@anchor='collected.abnf']//artwork) != normalize-space($collected)">
|
---|
24 | <xsl:message>WARNING: appendix contained inside source document needs to be updated</xsl:message>
|
---|
25 | <!--<xsl:message>A: <xsl:value-of select="//section[@anchor='collected.abnf']//artwork"/></xsl:message>
|
---|
26 | <xsl:message>B: <xsl:value-of select="$collected"/></xsl:message>-->
|
---|
27 | </xsl:if>
|
---|
28 | </xsl:template>
|
---|
29 |
|
---|
30 |
|
---|
31 | </xsl:transform> |
---|
Note: See
TracBrowser
for help on using the repository browser.