OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]


Subject: Re: DOCBOOK: MathML


Hello Felix,

On Sun, 24 Feb 2002, Felix Breuer wrote:
> I am trying to get the MathML Module of DocBook working, but I had no
> success so far.
>
> I have the docbook-xsl-1.49 package. I am using Xalan. I managed to
> process "ordinary" DocBook XML files. However, whenever I try to
> transform a file containing MathML tags (e.g. <mml:mrow>, etc.) I get a
> message saying that: "The namespace prefix "mml" was not declared."
>
> This happens even with the example file provided along with the DTD
> (which I got from:
> http://www.oasis-open.org/docbook/xml/mathml/1.0/index.shtml )
<snip/>
> PS.: My Internet connection was up, while processing the file, so the
> problem was not that xalan could not access the (remote) DTDs.

I suppose the error message comes from parsing your docbook document so I
think the undeclared namespace comes from using the wrong DTD. Did you
use:

<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook MathML Module V1.0//EN"
  "http://www.docbook.org/xml/mathml/1.0/dbmathml.dtd">

to activate the mathml-driver instead of using plain docbook DTD? See the
comment at the beginning of mathml.dtd for further details.

Furhtermore it seems to me as if MathML support in the modular xsl
stylesheets is not fully implemented, at least for (x)html output format.
A quick glance at the new db-xsl-1.49 showed no corresponding
xsl:template. So you might need to add/replace something like the
following to your stylesheet driver file:

<?xml version="1.0" encoding="iso-8859-1"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
                xmlns:mml="http://www.w3.org/1998/Math/MathML"
                exclude-result-prefixes="doc mml"
                version='1.0'>

 <xsl:import
href="whereever/your/stylesheets/are/located/html/docbook.xsl"/>

 <!-- MathML support can be so easy ;-) ... -->
 <xsl:template match="mml:math">
   <xsl:copy-of select="."/>
 </xsl:template>
 <!-- end of MathML support. -->

</xsl:stylesheet>


HTH,
Steffen.

-- 
  http://w3studi.informatik.uni-stuttgart.de/~maiersn/
mailto:Steffen.Maier@studserv.uni-stuttgart.de



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]


Powered by eList eXpress LLC