aboutsummaryrefslogtreecommitdiffstats
path: root/docs/xml-docs/style/stylesheets/book2group.xsl
diff options
context:
space:
mode:
Diffstat (limited to 'docs/xml-docs/style/stylesheets/book2group.xsl')
-rw-r--r--docs/xml-docs/style/stylesheets/book2group.xsl34
1 files changed, 34 insertions, 0 deletions
diff --git a/docs/xml-docs/style/stylesheets/book2group.xsl b/docs/xml-docs/style/stylesheets/book2group.xsl
new file mode 100644
index 000000000..1c1f0498b
--- /dev/null
+++ b/docs/xml-docs/style/stylesheets/book2group.xsl
@@ -0,0 +1,34 @@
+<?xml version="1.0"?>
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/XSL/Transform/1.0">
+
+ <xsl:param name="id"/>
+
+ <xsl:template match="/">
+ <xsl:apply-templates/>
+ </xsl:template>
+
+ <xsl:template match="book">
+ <group title="{group[attribute::id=$id]/@label}">
+ <xsl:apply-templates select="group[attribute::id=$id]/entry"/>
+ </group>
+ </xsl:template>
+
+ <xsl:template match="entry">
+ <entry id="{@id}" title="{document(concat('sbk:/sources/',@source))/faqs/@title}">
+ <xsl:apply-templates select="document(concat('sbk:/sources/',@source))/faqs/faq"/>
+ </entry>
+ </xsl:template>
+
+ <xsl:template match="faq">
+ <voice>
+ <xsl:if test="string-length(@title)=0">
+ <xsl:value-of select="q"/>
+ </xsl:if>
+ <xsl:if test="string-length(@title)>0">
+ <xsl:value-of select="@title"/>
+ </xsl:if>
+ </voice>
+ </xsl:template>
+
+</xsl:stylesheet> \ No newline at end of file