all groups > dotnet xml > april 2004 >
You're in the

dotnet xml

group:

Validation error The 'xsi:noNameSpaceSchemaLocation' attribute is not declared


Validation error The 'xsi:noNameSpaceSchemaLocation' attribute is not declared AP
4/27/2004 12:41:32 PM
dotnet xml:
Hi, I'm getting the following error trying to validate an xml document
against a schema:
The 'xsi:noNameSpaceSchemaLocation' attribute is not declared
My xml file looks like this:

<?xml version="1.0" encoding="utf-8"?>
<TitleNotification xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
d1p1:noNameSpaceSchemaLocation="http://www.pdr.com&#xA;https://extw3c.pdr.co
m/prism/b2b/schemas/TitleNotification.xsd" ParagonID="1234" Version="1"
Source="5" SupplierID="PA-1234" xmlns:d1p1="xsi" xmlns="http://www.pdr.com">
<OrderDate>2004-04-23</OrderDate>
<ClearTitle>false</ClearTitle>
</TitleNotification>

and my schema looks like this:

<?xml version="1.0" encoding="UTF-8"?>

<xs:schema targetNamespace="http://www.pdr.com" xmlns="http://www.pdr.com"
xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"
attributeFormDefault="unqualified">

<xs:include schemaLocation="Paragon.xsd"/>

<xs:element name="TitleNotification">

<xs:annotation>

<xs:documentation>Notification from HS Supplier to
Paragon</xs:documentation>

</xs:annotation>

<xs:complexType>

<xs:sequence>

<xs:element name="OrderDate" type="xs:date"/>

<xs:element name="ClearTitle" type="xs:boolean"/>

<xs:element name="FurtherActionsRequired" type="xs:boolean" minOccurs="0"/>

</xs:sequence>

<xs:attribute name="ParagonID" type="xs:positiveInteger" use="required"/>

<xs:attribute name="Version" type="xs:float" use="required"/>

<xs:attribute name="Source" type="xs:string" use="required"/>

<xs:attribute name="SupplierID" type="xs:string" use="required"/>

</xs:complexType>

</xs:element>

</xs:schema>


Any ideas why this is happening?

Thanks,
Adam

Re: Validation error The 'xsi:noNameSpaceSchemaLocation' attribute is not declared AP
4/27/2004 2:11:13 PM
I found the problem, the xmlns="http://www.pdr.com" root attribute was
throwing off the validator.

[quoted text, click to view]

AddThis Social Bookmark Button