RE: Poorly researched observations on <xsd:key>, <xsd:keyref> and <xsd:unique>

Don't worry, the subject is still valid since nothing in this message reflects additional study.

From Part 1, Section 3.10:
{selector} specifies an XPath expression [XPath] relative to instances of the element being declared. This must identify a node set of subelements (i.e. elements contained within the declared element)
to which the constraint applies.
Whether an arbitrary XPath expression (for example, one that uses the id() function or the parent axis) identifies a node set of subelements of the context element can't be determined until applied to
the document being validated.  It would be better to constrain selector so that only expressions that always return subelements are allowed, such as saying that the xpath attribute must be a UnionExpr
where any AxisSpecifier is restricted to the set (child, descendant, self or descendant-or-self, //, .).

Received on Friday, 9 February 2001 17:56:54 UTC