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

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • AP

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

    Hi, I'm getting the following error trying to validate an xml document
    against a schema:
    The 'xsi:noNameSpac eSchemaLocation ' attribute is not declared
    My xml file looks like this:

    <?xml version="1.0" encoding="utf-8"?>
    <TitleNotificat ion xmlns:xsd="http ://www.w3.org/2001/XMLSchema"
    xmlns:xsi="http ://www.w3.org/2001/XMLSchema-instance"
    d1p1:noNameSpac eSchemaLocation ="http://www.pdr.com&#xA ;https://extw3c.pdr.co
    m/prism/b2b/schemas/TitleNotificati on.xsd" ParagonID="1234 " Version="1"
    Source="5" SupplierID="PA-1234" xmlns:d1p1="xsi " xmlns="http://www.pdr.com">
    <OrderDate>20 04-04-23</OrderDate>
    <ClearTitle>fal se</ClearTitle>
    </TitleNotificati on>

    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" elementFormDefa ult="qualified"
    attributeFormDe fault="unqualif ied">

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

    <xs:element name="TitleNoti fication">

    <xs:annotatio n>

    <xs:documentati on>Notification from HS Supplier to
    Paragon</xs:documentatio n>

    </xs:annotation>

    <xs:complexType >

    <xs:sequence>

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

    <xs:element name="ClearTitl e" type="xs:boolea n"/>

    <xs:element name="FurtherAc tionsRequired" type="xs:boolea n" minOccurs="0"/>

    </xs:sequence>

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

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

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

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

    </xs:complexType>

    </xs:element>

    </xs:schema>


    Any ideas why this is happening?

    Thanks,
    Adam


  • AP

    #2
    Re: Validation error The 'xsi:noNameSpac eSchemaLocation ' attribute is not declared

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

    "AP" <adamp@indra.co m> wrote in message
    news:eAmd7cILEH A.3664@TK2MSFTN GP10.phx.gbl...[color=blue]
    > Hi, I'm getting the following error trying to validate an xml document
    > against a schema:
    > The 'xsi:noNameSpac eSchemaLocation ' attribute is not declared
    > My xml file looks like this:
    >
    > <?xml version="1.0" encoding="utf-8"?>
    > <TitleNotificat ion xmlns:xsd="http ://www.w3.org/2001/XMLSchema"
    > xmlns:xsi="http ://www.w3.org/2001/XMLSchema-instance"
    >[/color]
    d1p1:noNameSpac eSchemaLocation ="http://www.pdr.com&#xA ;https://extw3c.pdr.co[color=blue]
    > m/prism/b2b/schemas/TitleNotificati on.xsd" ParagonID="1234 " Version="1"
    > Source="5" SupplierID="PA-1234" xmlns:d1p1="xsi "[/color]
    xmlns="http://www.pdr.com">[color=blue]
    > <OrderDate>20 04-04-23</OrderDate>
    > <ClearTitle>fal se</ClearTitle>
    > </TitleNotificati on>
    >
    > 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" elementFormDefa ult="qualified"
    > attributeFormDe fault="unqualif ied">
    >
    > <xs:include schemaLocation= "Paragon.xs d"/>
    >
    > <xs:element name="TitleNoti fication">
    >
    > <xs:annotatio n>
    >
    > <xs:documentati on>Notification from HS Supplier to
    > Paragon</xs:documentatio n>
    >
    > </xs:annotation>
    >
    > <xs:complexType >
    >
    > <xs:sequence>
    >
    > <xs:element name="OrderDate " type="xs:date"/>
    >
    > <xs:element name="ClearTitl e" type="xs:boolea n"/>
    >
    > <xs:element name="FurtherAc tionsRequired" type="xs:boolea n"[/color]
    minOccurs="0"/>[color=blue]
    >
    > </xs:sequence>
    >
    > <xs:attribute name="ParagonID " type="xs:positi veInteger" use="required"/>
    >
    > <xs:attribute name="Version" type="xs:float" use="required"/>
    >
    > <xs:attribute name="Source" type="xs:string " use="required"/>
    >
    > <xs:attribute name="SupplierI D" type="xs:string " use="required"/>
    >
    > </xs:complexType>
    >
    > </xs:element>
    >
    > </xs:schema>
    >
    >
    > Any ideas why this is happening?
    >
    > Thanks,
    > Adam
    >
    >[/color]


    Comment

    Working...