- From: Biron,Paul V <Paul.V.Biron@kp.org>
- Date: Tue, 2 Jan 2001 15:58:25 -0800
- To: www-xml-schema-comments@w3.org
see below... > -----Original Message----- > From: Noah_Mendelsohn@lotus.com [SMTP:Noah_Mendelsohn@lotus.com] > Sent: Tuesday, January 02, 2001 3:31 PM > To: www-xml-schema-comments@w3.org > Subject: Scoping of IDREF value space when doing selective validation > > I think this may have been discussed along the way, but just in case: > > From [1]: > > "[Definition:] IDREF represents the IDREF attribute type from [XML 1.0 > Recommendation (Second Edition)]. The value space of IDREF is the set of > all strings that match the NCName production in [Namespaces in XML] and > have been used in an XML document as the value of an element or attribute > of type ID. The lexical space of IDREF is the set of strings that match > the > NCName production in [Namespaces in XML]. > > NOTE: The value space of IDREF is scoped to a specific instance document." > > From [2]: > > "7.2 Assessing Schema-Validity of Documents > > With a schema which satisfies the conditions expressed in Errors in Schema > Construction and Structure (§7.1) above, the schema-validity of an element > information item can be assessed." > > In other words, one can validate an element information item without > explicit reference to its parent or possible document context. My > question: if I validate: > > <E someattr="X"/> > > and someattr has the datatype IDREF, how do I I know whether it is part of > a document such as: > > <DOC> > <A ID="X"/> <!-- makes attr below valid --> > <E someattr="X"/> > </DOC> > > or > > <DOC> > <E someattr="X"/> <!-- invalid? --> > </DOC> > > Similar considerations apply to key/keyref, I think? As far as I can > tell, > the structures spec. is self-consistent, but the datatype specification is > appealing to a notion of "document" that structures doesn't support well. > What am I missing? I think we did discuss this, but can't remember the > resolution. Thanks. > > [1] http://www.w3.org/TR/xmlschema-2/#IDREF > [2] http://www.w3.org/TR/xmlschema-1/#validation_outcome > Well, the reason the datatypes spec is written that way is because that's the way ID/IDREF are defined in XML1.0. If there is an conflict between how the structures spec defines validation in this regard, as ugly as it may sound, my first reaction is that it would have to modified to special case ID/IDREF to account for the "document-ness" of these data types. You also bring up the case of key/keyref. The key/keyref definitions give the processor enough information to evaluate context, even when that context is beyond the current "validation context"; besides, the context involved in ID/IDREF is a very simple one, much simpler than potentially the case with a complex key/keyref. Is there something that I'm missing? pvb
Received on Tuesday, 2 January 2001 19:08:22 UTC