Matt, We use MathML and XSLTPROC to process the Docbook. I have found out that you need to add in some ENTITY statements into your customization. We do this primarily because we put MathML in a separate XML file and then include it. <!-- MathML Definitions --> <!ENTITY % mathml-colon ':'> <!ENTITY % mathml-prefix 'mml'> <!ENTITY % mathml-math '%mathml-prefix;%mathml-colon;math' > <!ENTITY % MATHML.prefixed "INCLUDE"> <!ENTITY % MATHML.prefix "mml"> <!ENTITY % equation.content "(alt?, (graphic+|mediaobject+|mathphrase+|%mathml-math;+|xi:include))"> <!ENTITY % inlineequation.content "(alt?, (graphic+|inlinegraphic+|inlinemediaobject+|mathphrase+|%mathml-math;+|xi:include))"> <!ENTITY % NamespaceDecl.attrib "xmlns%mathml-colon;%mathml-prefix; CDATA #FIXED 'http://www.w3.org/1998/Math/MathML' "> <!ENTITY % mathml PUBLIC "-//W3C//DTD MathML 2.0//EN" "http://www.w3.org/Math/DTD/mathml2/mathml2.dtd"> %mathml;
<!ENTITY % local.equation.attrib "align CDATA #IMPLIED"> <!ENTITY % local.informalequation.attrib "align CDATA #IMPLIED"> ----------------- Then if you have a local copy of the DTD you will need to point to it in your catalog <public publicId="-//W3C//DTD MathML 2.0//EN" uri="doctools/MathML2/mathml2.dtd"/> or something like that. It sounds like you are not resolving the MML data correclty which would probably be in your catalog. Also, you may want to point to the standard current MathML DTD at W3, but that it probably not your issue. Regards, Dean Nelson In a message dated 3/15/2011 10:08:30 A.M. Pacific Daylight Time, mar...@osource.org writes: Hi all, We're trying to use mathml for some equations in some of our xml docs but we keep getting 'failed to load external entities' errors. mathmldb.dtd is installed locally but it doesn't seem to matter. Is it not possible to embed mathml within a docbook (book or article) file? Does it need to be its own file and then xincluded? The doctype def is: <?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook MathML Module V1.0//EN" "http://www.oasis-open.org/docbook/xml/mathml/1.0/dbmathml.dtd"> <book id="xkbproto"> ... <informalequation> <mml:math> <mml:msup> <mml:mfenced> <mml:mi>a</mml:mi> <mml:mo>+</mml:mo> <mml:mi>b</mml:mi> </mml:mfenced> <mml:mn>2</mml:mn> </mml:msup> </mml:math> </informalequation> ... which caused the following validation errors: $ make Making all in specs make[1]: Entering directory `/home/fcarrijo/softwares/repositorio/xorg/proto/kbproto/specs' GEN xkbproto.html xmlto: /home/fcarrijo/softwares/repositorio/xorg/proto/kbproto/specs/xkbproto.xml does not validate (status 3) xmlto: Fix document syntax or use --skip-validation option I/O error : Attempt to load network entity http://www.oasis-open.org/docbook/xml/mathml/1.0/dbmathml.dtd /home/fcarrijo/softwares/repositorio/xorg/proto/kbproto/specs/xkbproto.xml:4 : warning: failed to load external entity "http://www.oasis-open.org/docbook/xml/mathml/1.0/dbmathml.dtd" "http://www.oasis-open.org/docbook/xml/mathml/1.0/dbmathml.dtd"> ^ /home/fcarrijo/softwares/repositorio/xorg/proto/kbproto/specs/ch04.xml:417: namespace error : Namespace prefix mml on math is not defined <mml:math> ^ Notes in libxml2 site point that "failed to load external entity" refers to a misconfigured XML Catalog, which I tried to fix installing two other packages... docbook-mathml w3-dtd-mathml ... and setting XML_DEBUG_CATALOG=1 before building, according to [1]. The environment variable set causes the build to output many more lines, being these the most relevant: Trying system delegate file:///etc/xml/docbook-xml.xml Resolve URI http://www.oasis-open.org/docbook/xml/mathml/1.0/dbmathml.dtd I/O error : Attempt to load network entity http://www.oasis-open.org/docbook/xml/mathml/1.0/dbmathml.dtd warning: failed to load external entity "http://www.oasis-open.org/docbook/xml/mathml/1.0/dbmathml.dtd" validity error : Could not load the external subset "http://www.oasis-open.org/docbook/xml/mathml/1.0/dbmathml.dtd" Document /home/fcarrijo/softwares/repositorio/xorg/proto/kbproto/specs/xkbproto.xml does not validate Catalogs cleanup Do you guys have any suggestions? [0] http://www.docbook.org/specs/wd-docbook-mathml-1.1CR1.html [1] http://xmlsoft.org/catalog.html#validate thanks, Matt --------------------------------------------------------------------- To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org