[XML-SIG] RELAX NG: failed parser attempt

Thomas B. Passin tpassin@home.com
Wed, 9 Jan 2002 19:57:09 -0500


[<akuchlin@mems-exchange.org>]

> I've gotten about half way through writing a DOM-based simplifier for
> the RELAX NG full syntax, and I'm on the verge of abandoning that
> approach.  About 15 or 16 of the 21 rules have been implemented: the
> easy ones, that is.  Even for easy things the code is kind of verbose,
> and for the difficult ones (such as #4.19) it'll be incomprehensible.
>
> So, now what?  Is there some alternate way of getting from the full
> syntax to the simple syntax?  XSLT is likely powerful enough to do the
> job, though maybe someone here will know for sure; is it?
>
> My next plan of attack is to write a conventional parser on top of
> pulldom and construct the Python tree representing a pattern, applying
> the simplifications as it goes, without going through the simple
> syntax as an intermediate step.  (I think this is what Jing does.)
>
> Any suggestions?  Or am I the only person who cares about RELAX NG?
>

No, I'd love to have NG in the toolbox!  I'm sure I would use it.  So far as
simplification is concerned, I got lost at that part of the Rec and decided
I'd rather stay with the full syntax.  Maybe James C knows that it has some
advantage for performing validation? (apparently not, from your experience).

I don't have anything concrete to offer at this point since I haven't
studied it carefully at all (especially the simplified syntax).  Any hope
for a Schematron-like approach (but in Python)?

Cheers,

Tom P