- From: Grosso, Paul <pgrosso@ptc.com>
- Date: Wed, 13 Aug 2008 09:45:17 -0400
- To: <public-xml-core-wg@w3.org>
-----Original Message----- From: public-xml-id-request@w3.org [mailto:public-xml-id-request@w3.org] On Behalf Of Murata Makoto Sent: Wednesday, 2008 August 13 5:12 To: public-xml-id@w3.org Cc: Michael.Brauer@sun.com; eb2m-mrt@j.asahi-net.or.jp Subject: 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 13:46:02 UTC