summaryrefslogtreecommitdiffstats
path: root/doc/xslt/xinclude_examples.xslt
diff options
context:
space:
mode:
authorDirk Baechle <dl9obn@darc.de>2013-05-03 22:27:37 (GMT)
committerDirk Baechle <dl9obn@darc.de>2013-05-03 22:27:37 (GMT)
commit6af67d1431b5d534731ff0dc17ff306639a1a854 (patch)
tree5ce85eab2b68b7500ff5ce45049bcf57c3296e75 /doc/xslt/xinclude_examples.xslt
parent10afdcc2e22670940b7de6319f614cb177f83516 (diff)
downloadSCons-6af67d1431b5d534731ff0dc17ff306639a1a854.zip
SCons-6af67d1431b5d534731ff0dc17ff306639a1a854.tar.gz
SCons-6af67d1431b5d534731ff0dc17ff306639a1a854.tar.bz2
- corrected xincludes for MAN pages
- started to work on support for UserGuide examples - added xslt for transforming SCons XSD to Docbook documents - added SConstructs for all documents and titlepage for the UserGuide
Diffstat (limited to 'doc/xslt/xinclude_examples.xslt')
-rw-r--r--doc/xslt/xinclude_examples.xslt41
1 files changed, 41 insertions, 0 deletions
diff --git a/doc/xslt/xinclude_examples.xslt b/doc/xslt/xinclude_examples.xslt
new file mode 100644
index 0000000..982391f
--- /dev/null
+++ b/doc/xslt/xinclude_examples.xslt
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Changing example command outputs to XIncludes for the UserGuide.
+-->
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format"
+ xmlns:scons="http://www.scons.org/dbxsd/v1.0"
+ xmlns:xsi="http://www.w3.org/2001/XInclude">
+ <xsl:output method="xml" encoding="UTF-8" indent="yes"/>
+
+ <!-- Copy everything unmatched -->
+ <xsl:template match="*">
+ <xsl:element name="{name()}" namespace="{namespace-uri()}">
+ <xsl:copy-of select="@*"/>
+ <xsl:apply-templates select="node()"/>
+ </xsl:element>
+ </xsl:template>
+
+ <xsl:template match="text() | comment() | processing-instruction()">
+ <xsl:copy/>
+ </xsl:template>
+
+ <!-- Changing scons_output_command to xinclude -->
+ <xsl:template match="scons:scons_output_command">
+ <xsl:element name="xsi:include">
+ <xsl:attribute name="href"><xsl:value-of select="concat('../generated/examples/',../@example,'_',@suffix,'.out')"></xsl:value-of></xsl:attribute>
+ <xsl:attribute name="parse">text</xsl:attribute>
+ </xsl:element>
+ </xsl:template>
+
+ <!-- Changing scons_example_file to xinclude -->
+ <xsl:template match="scons:scons_example_file">
+ <xsl:variable name="newfile" select="translate(@name,'/','_')"/>
+ <xsl:element name="programlisting">
+ <xsl:element name="xsi:include">
+ <xsl:attribute name="href"><xsl:value-of select="concat('../generated/examples/',@example,'_',$newfile)"></xsl:value-of></xsl:attribute>
+ <xsl:attribute name="parse">text</xsl:attribute>
+ </xsl:element>
+ </xsl:element>
+ </xsl:template>
+
+</xsl:stylesheet>