2 The first stylesheet to be used, this file cleans up the structure
3 of the Lisp-generated XML file by extracting elements from all
4 docstrings into their parent elements, so that only the textual
5 description remains in the <documentation-string>.
12 <documentation-string>
14 <see-slot id="foo">See also the foo function.</see-slot>
16 </documentation-string>
26 <see id="foo">See also the foo function.</see>
30 <documentation-string>
33 </documentation-string>
38 <xsl:stylesheet xmlns:
xsl=
"http://www.w3.org/1999/XSL/Transform" version=
"1.0">
39 <xsl:output method=
"xml" indent=
"yes"/>
41 <xsl:template match=
"@*|node()">
43 <xsl:apply-templates select=
"@*|node()"/>
47 <xsl:template match=
"see"/>
48 <xsl:template match=
"see-slot"/>
49 <xsl:template match=
"see-constructor"/>
50 <xsl:template match=
"arg"/>
51 <xsl:template match=
"return"/>
52 <xsl:template match=
"implementation-note"/>
53 <xsl:template match=
"section"/>
55 <xsl:template mode=
"extract" match=
"@*|node()">
57 <xsl:apply-templates select=
"@*|node()"/>
61 <xsl:template mode=
"extract" match=
"see-slot">
63 <xsl:apply-templates select=
"@*"/>
64 <xsl:apply-templates/>
68 <xsl:template mode=
"extract" match=
"see-constructor">
70 <xsl:apply-templates select=
"@*"/>
71 <xsl:apply-templates/>
75 <xsl:template match=
"documentation-string">
76 <xsl:if test=
".//arg">
78 <xsl:apply-templates mode=
"extract" select=
".//arg"/>
82 <xsl:if test=
".//section">
84 <xsl:apply-templates mode=
"extract" select=
".//section"/>
88 <xsl:if test=
".//see or .//see-slot or .//see-constructor">
90 <xsl:if test=
".//see">
92 <xsl:apply-templates mode=
"extract" select=
".//see"/>
96 <xsl:if test=
".//see-slot">
98 <xsl:apply-templates mode=
"extract" select=
".//see-slot"/>
102 <xsl:if test=
".//see-constructor">
104 <xsl:apply-templates mode=
"extract" select=
".//see-constructor"/>
110 <xsl:apply-templates mode=
"extract" select=
".//implementation-note"/>
111 <xsl:apply-templates mode=
"extract" select=
".//return"/>
113 <documentation-string>
114 <xsl:apply-templates/>
115 </documentation-string>