XmlSchemaValidationException when using xml:id attribute

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
I have an XML file that uses the xml:id special attribute as defined here: http://www.w3.org/TR/xml-id/
http://www.w3.org/TR/xml-id/ -- however, when I try to parse this XML I get the following exception:
<pre class="prettyprint The http://www.w3.org/XML/1998/namespace:id attribute is not declared.

Exception: System.Xml.Schema.XmlSchemaValidationException
Message: The http://www.w3.org/XML/1998/namespace:id attribute is not declared.
Stack: at System.Xml.Schema.XmlSchemaValidator.SendValidationEvent(XmlSchemaValidationException e, XmlSeverityType severity)
at System.Xml.Schema.XmlSchemaValidator.SendValidationEvent(String code, String arg)
at System.Xml.Schema.XmlSchemaValidator.ValidateAttribute(String lName, String ns, XmlValueGetter attributeValueGetter, String attributeStringValue, XmlSchemaInfo schemaInfo)
at System.Xml.XsdValidatingReader.ValidateAttributes()
at System.Xml.XsdValidatingReader.ProcessElementEvent()
at System.Xml.XsdValidatingReader.Read()
at WindwardArrow.net.windward.arrow.datasource.xml.l.CanConnect()[/code]
Can anyone tell me why this is happening? Heres the relevant section of the XML:
<pre class="prettyprint <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<data
xmlns="urn:x-KP:psp:merge"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance
<recipient xml:id="IM00011_171761_1" include="cover_zh enclosureA_zh enclosureB_zh cover_en enclosureA_en enclosureB_en
...
</recipient>
</data>[/code]
Malcolm McCrimmon

View the full article
 
Back
Top