This is the mail archive of the docbook-apps@lists.oasis-open.org mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [docbook-apps] Setting doctype in output files


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/.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]