RELAX NG and Python

Jonathan Cooper <[email protected]>
Newsgroups gmane.comp.python.xml
Message-ID <[email protected]>
I'm having some difficulties validating using RELAX NG in Python.  I've
been writing a schema for CellML files (www.cellml.org; current schema is
at http://jonc.me.uk/stuff/cellml1.0.rng), and I can validate various
example documents using jing.  The python tools I've come across have not
been as successful.


4Suite appears to have problems parsing constructs like:
foreign-elements =
  element * - (cellml:* | rdf:* | mathml:*) { foreign-nodes }*

It throws an RngSchemaInvalidException: Unamed Element


Using lxml results in an error value of XML_RELAXNG_ERR_MEMORY, which
isn't very helpful.


Using the libxml2 module directly says that the file is invalid (curious,
since jing says it's valid when using the same schema, and it looks fine
to me).  Trying to find out which element 'fails' is tricky, since
calling LineNumber() on the xmlTextReaderLocator object passed to my
error handler causes a segfault :(


Any suggestions for what to try next?

TIA,
 Jonathan.

-- 
Jonathan Cooper      MSN: [email protected]      www: jonc.me.uk/

In democracy your vote counts. In feudalism your count votes.
_______________________________________________
XML-SIG maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/xml-sig
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.