Ignore:
Timestamp:
Sep 15, 2012, 3:06:59 AM (7 years ago)
Author:
julian.reschke@…
Message:

Trim index.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • draft-ietf-httpbis/latest/extract-cache-directives.xslt

    r825 r1896  
    1111<my:data>
    1212  <my:item>
    13     <iref item='Cache Directives' subitem='stale-while-revalidate'>
     13    <iref item='stale-while-revalidate (cache directive)'>
    1414      <xref target="RFC5861" x:fmt="," x:sec="3"/>
    1515    </iref>
    16     <iref item='Cache Directives' subitem='stale-if-error'>
     16    <iref item='stale-if-error (cache directive)'>
    1717      <xref target="RFC5861" x:fmt="," x:sec="4"/>
    1818    </iref>
     
    2626      <ttcol>Reference</ttcol>
    2727      <xsl:text>&#10;</xsl:text>
    28       <xsl:apply-templates select="//iref[@item='Cache Directives']|document('')//iref[@item='Cache Directives']">
    29         <xsl:sort select="@subitem"/>
     28      <xsl:apply-templates select="//iref[contains(@item,' (cache directive)') and @primary='true']|document('')//iref">
     29        <xsl:sort select="@item"/>
    3030      </xsl:apply-templates>
    3131    </texttable>
     
    8686
    8787<xsl:template match="iref">
    88   <xsl:variable name="dir" select="@subitem"/>
    89   <xsl:if test="not(preceding::iref[@item='Cache Directives' and @subitem=$dir])">
     88  <xsl:variable name="t" select="@item"/>
     89  <xsl:variable name="dir" select="substring-before($t,' (cache directive)')"/>
     90  <xsl:if test="not(preceding::iref[@item=$t])">
    9091
    9192    <xsl:text>&#10;</xsl:text>
     
    105106        </xsl:when>
    106107        <xsl:otherwise>
    107           <xsl:for-each select="//*[iref[@item='Cache Directives' and @subitem=$dir]]">
     108          <xsl:for-each select="//*[iref[@item=$t]]">
    108109            <xsl:if test="position()!=1">
    109110              <xsl:text>, </xsl:text>
Note: See TracChangeset for help on using the changeset viewer.