1 <?xml version=
"1.0" encoding=
"UTF-8"?>
3 Changing example command outputs to XIncludes for the UserGuide.
5 <xsl:stylesheet version=
"1.0" xmlns:
xsl=
"http://www.w3.org/1999/XSL/Transform" xmlns:
fo=
"http://www.w3.org/1999/XSL/Format"
6 xmlns:
scons=
"http://www.scons.org/dbxsd/v1.0"
7 xmlns:
xsi=
"http://www.w3.org/2001/XInclude">
8 <xsl:output method=
"xml" encoding=
"UTF-8" indent=
"yes"/>
10 <!-- Copy everything unmatched -->
11 <xsl:template match=
"*">
12 <xsl:element name=
"{name()}" namespace=
"{namespace-uri()}">
13 <xsl:copy-of select=
"@*"/>
14 <xsl:apply-templates select=
"node()"/>
18 <xsl:template match=
"text() | comment() | processing-instruction()">
22 <!-- Changing scons_output to xinclude -->
23 <xsl:template match=
"scons:scons_output">
24 <xsl:element name=
"xsi:include">
25 <xsl:attribute name=
"href"><xsl:value-of select=
"concat('../generated/examples/',@example,'_',@suffix,'.xml')"></xsl:value-of></xsl:attribute>
29 <!-- Changing scons_example_file to xinclude -->
30 <xsl:template match=
"scons:scons_example_file">
31 <xsl:variable name=
"newfile" select=
"translate(@name,'/','_')"/>
32 <xsl:element name=
"programlisting">
33 <xsl:element name=
"xsi:include">
34 <xsl:attribute name=
"href"><xsl:value-of select=
"concat('../generated/examples/',@example,'_',$newfile)"></xsl:value-of></xsl:attribute>
35 <xsl:attribute name=
"parse">text
</xsl:attribute>