If the attribute is defined as an ID in the Schema or the DTD, then it must
be unique. Here are the refs to the specs that state that:

http://www.w3.org/TR/2000/WD-xml-2e-20000814#NT-TokenizedType

http://www.w3c.org/TR/xmlschema-2/#ID

Here is the quote (XML, 3.3.1):
"Validity constraint: ID
Values of type ID must match the Name production. A name must not appear
more than once in an XML document as a value of this type; i.e., ID values
must uniquely identify the elements which bear them."

Hope this helps,

Denny

----- Original Message ----- 
From: "Oliver, Steve" <[EMAIL PROTECTED]>
To: "Xerces Dev" <[EMAIL PROTECTED]>
Sent: Thursday, December 11, 2003 2:29 PM
Subject: Schema Error


I am using Xerces-C++ 2.3. When attempting to validate an XML document I get
the following error...

Error at file OTA_Profile.xsd, line 2, char 122
  Message: ID 'OTA2003A2003A' is not unique

The schema file that I am using has several included schema. Each of the
included schemas has an element that looks like this

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema";
elementFormDefault="qualified" version="1.000" id="OTA2003A2003A">

I'm guessing that Xerces does not like the fact that all of the included
schemas have the same value in their id attribute. I have tried to find
anything in the XML specifications that states that the id attribute is
required to be unique. All I have found is the following statement in XML
Schema Part 1...

"... The other attributes (id and version) are for user convenience, and
this specification defines no semantics for them."

Based on that it seems that the user is free to do whatever he wants with
regard to the value of the id attribute. Have I missed something that would
tell me that this attribute must be unique?

Steve

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to