[XML-SIG] XSchema Parser

Lars Marius Garshol larsga@garshol.priv.no
22 Aug 2001 16:43:31 +0200


* Christian Selig
| 
| Now, the editor needs to know at which node it may insert which other 
| nodes, which nodes it has to insert because they are required etc. etc.
| 
| So I need to parse the DTD.

xmlproc already contains all you need to do this. It has a separate
DTD parser you can use to load a DTD object, from which you can find
all elements. You can step through the content models of all elements,
and see what elements are legal at each step.

<URL: http://www.garshol.priv.no/download/software/xmlproc/dtd-api-doco.html#ElementType >

xmleditor, mentioned by Nicolas Chauvat, uses xmlproc to provide
context-sensitivity.

| Or the Schema. I decided to go for the latter, because as soon as
| XSchema matures, DTDs will likely become obsolete step by step.

Maybe, maybe not. There are an awful lot of DTDs out there already,
and many people are less than happy with XSchema.

| I have browsed the web for a Python-based XSchema Parser, but so far, I 
| have not found anything.

XSV is out there, but how useful it would be to you I don't know.

<URL: http://www.ltg.ed.ac.uk/~ht/xsv-status.html >
 
| I won't promise anything. But chances are good that I may put it
| under a free license and contribute it to the PyXML project. My
| question is: Do you want that code, after all?

Provided the code is of reasonable quality I would consider that a
good idea. We accepted PyTREX, so I don't see how we could refuse
something based on an equivalent W3C Recommendation.

--Lars M.