If you need to do work with schema stuff (RelaxNG, Schematron, or XML Schema. Oh, and DTDs but you don't want those of course) and you're running windows, I highly recommend trying out the Topologi Validator.
Currently, the only thing worse than the XML Schema specification is the XML Schema toolset. Almost all of the tools are terribly limited, buggy, incomprehensible, etc. (check all that apply) and while Topologi isn't really an exception in that it uses buggy MSXML underneath, it does manage to make a lot of that bearable.
Thankfully, Andy Wardley told me that his XML::Schema module should be out soon. I'm pretty certain that it'll make working with schemata a lot easier.
The only thing I'd like more than XML::Schema would be an XML::RelaxNG module...
Sadly, I have no clue whatsoever as to how one would go about implementing such a thing.
-Dom
Re:RelaxNG
darobin on 2002-08-28T12:15:52
Yes, that's something I want. If I had more spre time, you'd have one from me but unfortunately that's not the case
:( Implementing the basics shouldn't be too hard. You need a core automaton part that matches the functionality needed by RNG and has a public API. Then you need parsers for the various RNG syntaxes that build such automata. That part should be easy, the XML syntax just needs to be normalised using a number of rather simple rules, the shorthand syntax is easy to get. Then you need to bridge a SAX stream to the automaton in such a way that it can always tell you if the token you just fed it matches one of the states it can move on at that point or not (in which case it blows up).
So the hard part is the automaton. There's prior art there -- lots of it -- for anyone that has the time to look ad wishes to become a hero
;) Re:RelaxNG
Matts on 2002-08-28T12:44:56
James Clark has published a very nice guide to Implementing RelaxNG. It would be a fantastic exercise for someone wanting to get into perl and XML hacking to go about implementing that.
And if nobody does, eventually I'll get around to it too;-)