RELAX NG and xml:id

Dear colleagues,

I have a question about interactions of xml:id and 
validation.

Consider a RELAX NG schema that defines xml:id as xsd:NCName rather
than xsd:ID and an DTD-free instance valid against this schema.  The
schema does NOT use the RELAX NG DTD compatibility specification.

Since RELAX NG validation does not change the information set, 
the [attribute type] property of the attribute xml:id is unknown.

I believe that there is nothing wrong in applying "ID attribute
normalization" and "ID type assignment" to xml:id in this instance
document.  In my understanding, xml:id tries to separate ID processing
from validation as much as possible.

However, Section 4 of the xml:id recommendation says:

	The declared type of the attribute, if it has one, is "ID".
	All declarations for xml:id attributes must specify "ID" as
	the type of the attribute.

Does this sentence prohibit my scenario?  The pattern for xml:id 
specifies xsd:NCName rather than xsd:ID.

Furthermore, what will happen if the xml:id attribute is validated
against wildcards?  For example: 

  anyAtt = attribute * { xsd:string }.

Such wildcards are useful when we would like to allow foreign elements
to contain any attribute.   Since the RELAX NG DTD compatibility 
specification allows the use of xsd:ID only when we precisely know 
the element name as well as the attribute name, we cannot 
have: 
  anyElement = element * {attribute xml:id {xsd:ID}?, anyElement*}

If the "anyAtt" define statement shown above is what you mean
"declaration", we cannot allow xml:id within foreign elements 
without giving up RELAX NG validation. 

Cheers,
Makoto

Received on Wednesday, 13 August 2008 10:12:43 UTC