"Fossies" - the Fresh Open Source Software Archive 
Member "memcached-1.6.15/doc/xml2rfc/rfc2629-noinc.xsl" (16 Jul 2020, 3082 Bytes) of package /linux/www/memcached-1.6.15.tar.gz:
As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) XML source code syntax highlighting (style:
standard) with prefixed line numbers.
Alternatively you can here
view or
download the uninterpreted source code file.
1 <?xml version="1.0" encoding="utf-8"?>
2 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
3 version="1.0">
4
5 <xsl:output method="xml"/>
6
7 <xsl:template name='noinc'>
8 <xsl:apply-templates mode='noinc'/>
9 </xsl:template>
10
11 <xsl:template match="*" mode='noinc'>
12 <xsl:copy>
13 <xsl:apply-templates select='@*' mode='noinc'/>
14 <xsl:apply-templates mode='noinc'/>
15 </xsl:copy>
16 </xsl:template>
17 <xsl:template match='@*' mode='noinc'>
18 <xsl:attribute name='{name()}'>
19 <xsl:value-of select='.'/>
20 </xsl:attribute>
21 </xsl:template>
22
23 <xsl:template match='processing-instruction("rfc")' mode='noinc'>
24 <xsl:choose>
25 <xsl:when test='substring-before(.,"=") = "include"'>
26 <xsl:call-template name='include-pi'>
27 <xsl:with-param name='include-href'>
28 <xsl:value-of select="translate( substring-after( ., '=' ), '" ', '' )"/><xsl:text>.xml</xsl:text>
29 </xsl:with-param>
30 </xsl:call-template>
31 </xsl:when>
32 <xsl:otherwise>
33 <xsl:copy-of select='.'/>
34 </xsl:otherwise>
35 </xsl:choose>
36 </xsl:template>
37
38 <xsl:template name='include-pi'>
39 <xsl:param name='include-href'/>
40 <xsl:apply-templates select="document( $include-href )" mode='noinc'/>
41 </xsl:template>
42
43 <xsl:template match='dwdrfc-ref' mode='noinc'>
44 <xsl:param name='include-href'>
45 <xsl:choose>
46 <xsl:when test='starts-with( @src, "http://" )'>
47 <xsl:value-of select='@src'/>
48 </xsl:when>
49 <xsl:otherwise>
50 <xsl:value-of select='@src'/>
51 </xsl:otherwise>
52 </xsl:choose>
53 </xsl:param>
54 <reference anchor="{@anchor}">
55 <xsl:apply-templates select="document( $include-href )" mode="refrename"/>
56 </reference>
57 </xsl:template>
58
59 <xsl:template match='*' mode='refrename'>
60 <xsl:apply-templates mode='refrename'/>
61 </xsl:template>
62
63 <xsl:template match='reference' mode='refrename'>
64 <xsl:apply-templates mode='noinc'/>
65 </xsl:template>
66
67 <xsl:template match='/'>
68 <xsl:call-template name='noinc'/>
69 </xsl:template>
70
71 <xsl:template name='output'>
72 <xsl:param name='foo'/>
73 <xsl:copy-of select='$foo'/>
74 <xsl:apply-templates select='$foo'/>
75 </xsl:template>
76
77 <xsl:template match='*' mode='output'>
78 <element>
79 <xsl:value-of select='name()'/>
80 <xsl:apply-templates mode='output'/>
81 </element>
82 </xsl:template>
83 <xsl:template match='text()' mode='output'/>
84
85 <!-- Reference checking attributes stripped here. -->
86 <xsl:template match='references' mode='noinc'>
87 <xsl:element name='references'>
88 <xsl:attribute name='title'>
89 <xsl:value-of select='@title'/>
90 </xsl:attribute>
91 <xsl:apply-templates mode='noinc'/>
92 </xsl:element>
93 </xsl:template>
94
95 <xsl:template match='xref' mode='noinc'>
96 <xsl:element name='xref'>
97 <xsl:attribute name='target'>
98 <xsl:value-of select='@target'/>
99 </xsl:attribute>
100 <xsl:apply-templates mode='noinc'/>
101 </xsl:element>
102 </xsl:template>
103
104 </xsl:stylesheet>