XML, xmlproc, MathML and validation
alanmk at hotmail.com
Fri Jul 11 16:02:51 CEST 2003
Will Stuyvesant wrote:
> I am trying to validate a document with mixed XHTML and MathML.
> And the w3c validator at http://validator.w3.org/ says my XML file is
> So far so good.
> But now I want to use xmlproc to both validate it and change something
> in it. I use "from xml.parsers.xmlproc import xmlval".
> This works good when the DTD is local but does not work in this case,
> where the DTD is remote. I can't have the MathML DTD local
That's what (SGML) "catalogs" are for: mapping public identifiers to
local files, and non-retrievable URIs to local files. For example, the
public identifier "-//W3C//DTD XHTML 1.1 plus MathML 2.0//EN" could be
mapped to a local file.
So you should be able to map DTD identifiers to your local system for
the times when a remote DTD is not available. More info from here
> The error message:
> ERROR: xml:space must have exactly the values 'default' and 'preserve'
> at http:/
Have you supplied a value for the "xml:space" attribute anywhere in
If yes: you must have supplied a wrong value: you can only use
"default" or "preserve".
If no: I'm not familiar enough with the MathML DTD to know if it has
special requirements for whitespace processing.
Looking at your error message, and the DTD, might it be that you have
used a value other than "xml:space='preserve'" on a <pre> section?
Just a guess.
check http headers here: http://xhaus.com/headers
email alan: http://xhaus.com/mailto/alan
More information about the Python-list