Ignore:
Timestamp:
Feb 28, 2009, 8:19:40 AM (11 years ago)
Author:
julian.reschke@…
Message:

fix line wrap in ABNF prose problem; update XSLT for collected ABNF to move diagnostics into separate figure

File:
1 edited

Legend:

Unmodified
Added
Removed
  • draft-ietf-httpbis/latest/abnf2xml2rfc.xslt

    r428 r454  
    2121      <xsl:text>&#10;</xsl:text>
    2222      <artwork type="abnf" name="{$abnf}">
    23         <xsl:for-each select="$lines">
     23        <xsl:for-each select="$lines[substring(.,1,2)!='; ']">
     24       
     25          <!-- Group by start character -->
    2426          <xsl:variable name="lineno" select="position()"/>
    2527          <xsl:variable name="sc1" select="substring(.,1,1)"/>
     
    2830            <xsl:text>&#10;</xsl:text>
    2931          </xsl:if>
     32
     33          <!-- Add cross-refs for terms -->
    3034          <xsl:analyze-string select="." regex='^([A-Za-z0-9\-]+) = ' flags="sm">
    3135            <xsl:matching-substring>
     
    4549            </xsl:non-matching-substring>
    4650          </xsl:analyze-string>
     51
    4752          <xsl:text>&#10;</xsl:text>
    4853        </xsl:for-each>
     
    5156    </figure> 
    5257    <xsl:text>&#10;</xsl:text>
     58   
     59    <figure>
     60      <preamble>ABNF diagnostics:</preamble>
     61      <artwork type="inline">
     62        <xsl:for-each select="$lines[substring(.,1,2)='; ']">
     63          <xsl:value-of select="."/>
     64          <xsl:text>&#10;</xsl:text>
     65        </xsl:for-each>
     66    </artwork></figure>
    5367  </section>
    5468
    5569  <!-- check whether it's up-to-date... -->
     70  <xsl:variable name="src">
     71    <xsl:for-each select="//section[@anchor='collected.abnf']//artwork">
     72      <xsl:value-of select="."/>
     73    </xsl:for-each>
     74  </xsl:variable>
    5675 
    57   <xsl:if test="not(//section[@anchor='collected.abnf']) or normalize-space(//section[@anchor='collected.abnf']//artwork) != normalize-space($collected)">
     76  <xsl:if test="not(//section[@anchor='collected.abnf']) or normalize-space($src) != normalize-space($collected)">
    5877    <xsl:message>WARNING: appendix contained inside source document needs to be updated</xsl:message>
    5978    <!--<xsl:message>A: <xsl:value-of select="//section[@anchor='collected.abnf']//artwork"/></xsl:message>
Note: See TracChangeset for help on using the changeset viewer.