- From: <bugzilla@wiggum.w3.org>
- Date: Mon, 20 Oct 2008 18:51:49 +0000
- To: www-xml-schema-comments@w3.org
http://www.w3.org/Bugs/Public/show_bug.cgi?id=6021 --- Comment #5 from Michael Kay <mike@saxonica.com> 2008-10-20 18:51:48 --- I'm always a bit averse to "as if" specifications, because they always leave a lot of room for interpretation. But I think it probably is possible to make the facility work. The big question is how one overrides definitions in multiple namespaces. One mechanism that might work is to require xs:override to appear like this <xs:schema> <xs:override schemaLocation="abc.xsd"/> <xs:import namespace="one.uri" schemaLocation="one-override.xsd"/> <xs:import namespace="two.uri" schemaLocation="two-override.xsl"/> <xs:element name="eeee"/> </xs:schema> Then we say that if xs:override appears in a schema document, it must be the first child of the xs:schema element; only one xs:override element is allowed in a schema document, and everything else in the schema document whether present directly or imported/included from elsewhere is there to override (or supplement) what is present in the overridden schema documents. The processing is then (ignoring any interaction with xs:redefine for the moment): (a) in the graph of schema documents, where the arcs joining them are xs:include, xs:import, and xs:override elements, there must be no cycle that includes an arc labelled xs:override. (b) in this graph if any two nodes M and N are connected by a path that includes an xs:override arc, then there must be no path from M to N that does not include this arc (c) it is thus possible to partition the schema documents in the graph into a tree of schema-document-sets where A is the parent of B in the tree if A contains an xs:override element that refers to a document in B. Call this the override tree. (d) within this tree, every schema document is transformed as follows: for every top-level declaration D, if an ancestor in the override tree contains a schema document that contains a top-level declaration with the same kind and expanded name as D, then D is deleted from the schema document (e) the entire graph of schema documents is then processed as if the xs:override elements were xs:include or xs:import elements. One way to handle redefine is simply to ban mixing it with override: it is an error if the override tree includes an xs:redefine element. -- Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug.
Received on Monday, 20 October 2008 18:51:57 UTC