public inbox for [email protected]  
help / color / mirror / Atom feed
From: Jürgen Purtz <[email protected]>
To: [email protected]
Subject: Re: First SVG graphic
Date: Mon, 7 Jan 2019 17:44:07 +0000
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
	<[email protected]>
	<CAF4Au4zQ7Vp_XfNFEbSPeed7pRnz2vdTVS3i8kBsX4ZCV48jDQ@mail.gmail.com>
	<[email protected]>
	<[email protected]>
	<[email protected]>

> 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





Attachments:

  [text/x-patch] stylesheet-html-nochunk.patch (981B, 3-stylesheet-html-nochunk.patch)
  download | inline diff:
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>


view thread (64+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected]
  Subject: Re: First SVG graphic
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox