[Bug 13674] [XQ30] schema-element() types behave differently in different modules.

http://www.w3.org/Bugs/Public/show_bug.cgi?id=13674

--- Comment #3 from Michael Kay <mike@saxonica.com> 2011-08-08 22:42:56 UTC ---
Certainly in Saxon, schema-element(E) will match any element known to be in the
substitution group of E - I think the spec is clear on that:

<quote>
schema-element(E) matches an element if (inter alia) "The name of the candidate
node matches ... the name of an element in a substitution group headed by an
element named ElementName." - it doesn't say that the element name has to be
declared in an imported schema or that the element declaration has to be "in
scope" (whatever that might mean).
</quote>

To make this work, Saxon imposes a rather crude constraint: as soon as a schema
namespace is referenced in an "import schema" declaration in any query module,
that namespace is "sealed". Sealing a namespace prevents certain changes being
made to the schema components in that namespace, in particular, it prevents the
substitution group of elements in that namespace being subsequently extended.
This is a rather draconian way of ensuring consistency between the compile-time
and run-time schemas. The effect is that the full substitution group of an
element named in a schema-element() test is always known statically.

-- 
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, 8 August 2011 22:42:58 UTC