Jirka wrote in response to my:
> Not sure what James' rules are, but to me there is a clear priority between the three cases stated in the unlikely event that more than one of them occurred in a single document:
>
> 1) An explicit doctype declaration must take precedence over anything that is specified on the root element that follows it.
> 2) Presuming that the PI precedes the root element then it must take precedence over anything specified in the root (but anywhere else it must be ignored because the root has already been parsed)
> 3) Attributes on the root only take precedence if there is no previously identified schema definition.
>Why do you think it should work this way? Schema picked depends on
validator you are using -- DTD validator will use !DOCTYPE, XSD
validator will use xsi:schemaLocation and oXygen will use PI when asked
for RELAX NG validation because there is no standardized way for
associating schema with instance.
Good point but if this is the case then the single choice is application dependent and we don't need to worry about it. What is James' rule in any case? Under what conditions would all three occcur and be triggerable? If you have a DTD processor you can't invoke a schema (W3 or RELAX NG) for part of the model. If you have a schema you can still have a Doctype for entity definition before the root of the XML. If you have a RELAX NG PI then you still need to process any DOCTYPE first for the entity references, but would a reference to a schema be valid in any way?
I stand by my point that the DOCTYPE has to be processed before the root, the schema location must be processed at the root and a RELAX NG call is only valid if it precedes the root, and must therefore override anything stated on the root.
Martin
-- DSDL members discussion list To unsubscribe, please send a message with the command "unsubscribe" to dsdl-discuss-request@dsdl.org (mailto:dsdl-discuss-request@dsdl.org?Subject=unsubscribe)Received on Fri Apr 13 19:54:05 2007
This archive was generated by hypermail 2.1.8 : Sat Apr 14 2007 - 20:13:08 UTC