[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Can XML Schema be compiled to Schematron?
Hi, Doug Ransom wrote: > I have been thinking that it would be an interesting exercise to > implement a compiler that transforms XML Schema into Schematron > (probably in XSLT). > > Is there any reason why this will not work? > My guess is that it could work for a vast majority of schemas but fail for those schemas which are not fully determined at "compile time". W3C XML Schema lets you use wildcards which are still validated, for instance when you write: <xs:all namespace="##other" processContents="strict"/> When such wildcards are used, a schema validator needs to retrieve the schema matching the namespace of elements which will be found in the instance document and the list of possible namespace isn't closed. When you combine this feature with a mechanism of schema "discovery" (RDDL or simple namespace URI dereferencing), you've got a situation where the schema cannot be fully "compiled" before the instance document is read (and the list of namespaces actually used by wildcard elements is known) and this seems impossible to implement with a straight "batch" compilation process. Fortunately, dynamic schema "discovery" isn't mandatory and this is something which you can probably just drop from your list of features, but I have thought it was something to be aware of ;=) ... Eric > > Doug Ransom > Internet Technologies Domain Lead > Power Measurement http://www.pwrm.com <http://www.pwrm.com/> > mailto:Doug.Ransom@p... > > > -- Rendez-vous a Paris pour les Electronic Business Days 2002. http://www.edifrance.org/ebd/index.htm ------------------------------------------------------------------------ Eric van der Vlist http://xmlfr.org http://dyomedea.com http://xsltunit.org http://4xt.org http://examplotron.org ------------------------------------------------------------------------
|
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
|