Re: Can XML Schema be compiled to Schematron?
Hi all, Rick Jelliffe wrote: > > You might start by processing your instance document with Francis > Norton's TypeTagger XSLT scripts, which add the type names (of > elements) to an instance. That will simplify life a lot, because > then the Schematron schema has access to type information from its > XPath 1.0. > Thanks for the mention. I'm afraid that TypeTagger  hasn't really moved on since the announcement - here are the contents of TypeTagger.txt "Run typeTagger.compiler.xslt over any schema to generate a typeTagger for that document type, then run the typeTagger instance over a document instance and you get a fully marked up version of the document. eg: -- C:\Projects\typeTagger>msxsl po.xsd typeTagger_0.compiler.xslt> po.typeTagger.xslt C:\Projects\typeTagger>msxsl po.xml po.typeTagger.xslt> temp.xml -- Every element in the document gets marked up with its Universal element name and Universal element type attributes, a kind of poor-man's PSVI... [Limitations - no support yet for xs:redefine or base/extends. Probably lots more too!] Also, you could use the same process to scan the document and rather than copying out marked-up markup, apply schematron-type rules that have been embedded in the schema." It would be nice to look again at the limitations with Rick's advice in mind, but I probably won't have a chance in the near future. But I'd be delighted if anyone wants to complete or extend it. Francis.  http://schemavalid.com/utils/typeTagger.zip
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format