My questions to the community are:

  * Does anyone has an idea how to generate single HTML file in the
    actual situation?


Thanks to an additional template created by Alexander Lakhin, which extends the 'nochunk' stylesheet for SVG and MathML processing, it is now possible to create the "single HTML file" of our documentation including SVG. For me this is a working solution as long as we use Docbook 4. After the migration to Docbook 5, both languages as well as full namespace support will be natively included in Docbook.

Does anyone faced some more problems? Or can we start to include the three first SVG graphics into PG's documentation?

Kind regards

Jürgen Purtz



diff --git a/doc/src/sgml/stylesheet-html-nochunk.xsl b/doc/src/sgml/stylesheet-html-nochunk.xsl
index ffd2012e91..3a20a47bce 100644
--- a/doc/src/sgml/stylesheet-html-nochunk.xsl
+++ b/doc/src/sgml/stylesheet-html-nochunk.xsl
@@ -9,4 +9,23 @@
 <xsl:include href="stylesheet-html-common.xsl" />
 <xsl:include href="stylesheet-speedup-xhtml.xsl" />
 
+<xsl:template match="imagedata">
+  <xsl:variable name="filename">
+    <xsl:call-template name="mediaobject.filename">
+      <xsl:with-param name="object" select=".."/>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <xsl:choose>
+    <!-- Handle MathML and SVG markup in imagedata -->
+    <xsl:when xmlns:mml="http://www.w3.org/1998/Math/MathML"; test="mml:*">
+      <xsl:apply-templates/>
+    </xsl:when>
+    <xsl:when xmlns:svg="http://www.w3.org/2000/svg"; test="svg:*">
+      <xsl:apply-templates/>
+    </xsl:when>
+  </xsl:choose>
+  <xsl:copy-of select="document($filename)"/>
+</xsl:template>
+
 </xsl:stylesheet>

Reply via email to