This is the mail archive of the
docbook-apps@lists.oasis-open.org
mailing list .
Re: [docbook-apps] Setting doctype in output files
- From: Justus dot Piater at ULg dot ac dot be (Justus H. Piater)
- To: Nicolas Pillot <nicolas dot pillot at polymtl dot ca>
- Cc: "docbook-apps at lists dot oasis-open dot org" <docbook-apps at lists dot oasis-open dot org>
- Date: Sat, 20 Mar 2004 08:54:07 +0100
- Subject: Re: [docbook-apps] Setting doctype in output files
- References: <1079752832.405bb880a5850@www.imp.polymtl.ca>
Hi,
See the write.chunk template in the DocBook XSL stylesheets, or use it
directly. This is what I do to extract SVG; it should work similarly
with MathML:
<xsl:template match="svg:svg" xmlns:svg="http://www.w3.org/2000/svg">
...
<xsl:call-template name="write.chunk">
<xsl:with-param name="filename" select="$filename"/>
<xsl:with-param name="doctype-public"
select="'-//W3C//DTD SVG 1.1//EN'"/>
<xsl:with-param
name="doctype-system"
select="'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-flat.dtd'"/>
<xsl:with-param name="content">
<xsl:copy-of select="."/>
</xsl:with-param>
</xsl:call-template>
</xsl:template>
This works for me (with xsltproc).
Justus
Nicolas Pillot <nicolas.pillot@polymtl.ca> wrote on Fri, 19 Mar 2004
22:20:32 -0500:
> I am using an XSL stylesheet to extract SVG and MathML resources
> from a docbook file. Extraction works fine, except the fact that the
> file created through xalan redirection have the same doctype as the
> one specified in the xsl:output of the stylesheet. Because i
> generate .svg (1.0) and .mml (2.0), i would like these file to have
> the appropriate doctypes.
--
Justus H. Piater, Ph.D. http://www.montefiore.ulg.ac.be/~piater/
Institut Montefiore, B28 Phone: +32-4-366-2279
Université de Liège, Belgium Fax: +32-4-366-2620
To unsubscribe from this list, send a post to docbook-apps-unsubscribe@lists.oasis-open.org, or visit http://www.oasis-open.org/mlmanage/.