Changeset 825 for draft-ietf-httpbis/latest/extract-cache-directives.xslt
- Timestamp:
- 02/06/10 07:50:07 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
draft-ietf-httpbis/latest/extract-cache-directives.xslt
r815 r825 3 3 xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#' 4 4 version="1.0" 5 xmlns:my="#my" 5 6 exclude-result-prefixes="rdf x" 6 7 > 7 8 8 9 <xsl:output indent="yes" omit-xml-declaration="yes"/> 10 11 <my:data> 12 <my:item> 13 <iref item='Cache Directives' subitem='stale-while-revalidate'> 14 <xref target="RFC5861" x:fmt="," x:sec="3"/> 15 </iref> 16 <iref item='Cache Directives' subitem='stale-if-error'> 17 <xref target="RFC5861" x:fmt="," x:sec="4"/> 18 </iref> 19 </my:item> 20 </my:data> 9 21 10 22 <xsl:template match="/"> … … 14 26 <ttcol>Reference</ttcol> 15 27 <xsl:text> </xsl:text> 16 <xsl:apply-templates select="//iref[@item='Cache Directives'] ">28 <xsl:apply-templates select="//iref[@item='Cache Directives']|document('')//iref[@item='Cache Directives']"> 17 29 <xsl:sort select="@subitem"/> 18 30 </xsl:apply-templates> … … 80 92 <c><xsl:value-of select="$dir"/></c> 81 93 <c> 82 <xsl:for-each select="//*[iref[@item='Cache Directives' and @subitem=$dir]]"> 83 <xsl:if test="position()!=1"> 84 <xsl:text>, </xsl:text> 85 </xsl:if> 86 <xref target="{ancestor-or-self::*[@anchor][1]/@anchor}"/> 87 </xsl:for-each> 94 <xsl:choose> 95 <!-- from this XSLT? --> 96 <xsl:when test="ancestor::my:item"> 97 <xsl:for-each select="xref"> 98 <xsl:if test="position()!=1"> 99 <xsl:text>, </xsl:text> 100 </xsl:if> 101 <xref> 102 <xsl:copy-of select="@*"/> 103 </xref> 104 </xsl:for-each> 105 </xsl:when> 106 <xsl:otherwise> 107 <xsl:for-each select="//*[iref[@item='Cache Directives' and @subitem=$dir]]"> 108 <xsl:if test="position()!=1"> 109 <xsl:text>, </xsl:text> 110 </xsl:if> 111 <xref target="{ancestor-or-self::*[@anchor][1]/@anchor}"/> 112 </xsl:for-each> 113 </xsl:otherwise> 114 </xsl:choose> 88 115 </c> 89 116 90 117 </xsl:if> 91 118 </xsl:template>
Note: See TracChangeset
for help on using the changeset viewer.