Connecting Tech Pros Worldwide Forums | Help | Site Map

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

AP
Guest
 
Posts: n/a
#1: Nov 12 '05
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



AP
Guest
 
Posts: n/a
#2: Nov 12 '05

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


I found the problem, the xmlns="http://www.pdr.com" root attribute was
throwing off the validator.

"AP" <adamp@indra.com> wrote in message
news:eAmd7cILEHA.3664@TK2MSFTNGP10.phx.gbl...[color=blue]
> 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"
>[/color]
d1p1:noNameSpaceSchemaLocation="http://www.pdr.com&#xA;https://extw3c.pdr.co[color=blue]
> m/prism/b2b/schemas/TitleNotification.xsd" ParagonID="1234" Version="1"
> Source="5" SupplierID="PA-1234" xmlns:d1p1="xsi"[/color]
xmlns="http://www.pdr.com">[color=blue]
> <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"[/color]
minOccurs="0"/>[color=blue]
>
> </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
>
>[/color]


Closed Thread


Similar .NET Framework bytes