473,624 Members | 2,191 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

AP
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
Nov 12 '05 #1
1 7780
AP
I found the problem, the xmlns="http://www.pdr.com" root attribute was
throwing off the validator.

"AP" <ad***@indra.co m> wrote in message
news:eA******** ******@TK2MSFTN GP10.phx.gbl...
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

Nov 12 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2863
by: Zandy Marantal | last post by:
Hello everyone, I'm having trouble using Xerces2(2.4, 2.5) when validating against an XML schema if a general entity reference is defined within the XML file. The error I'm getting is this: "org.xml.sax.SAXParseException: Element type "personnel" must be declared." Xerces1(1.4.3, 1.4.4) doesn't have an issue with this. As is XML Spy.
2
1961
by: Marcio DeBarros | last post by:
Hi, I am using JDOM to create and validate XML document in a Java app. for the first time, and am getting the error above when I am validating a document with SAXBuilder with the following DTD: <?xml version="1.0" encoding="utf-8" ?> <!-- DTD for a user definition file --> <!ELEMENT user (username, password, email?)> <!ATTLIST user id ID #REQUIRED>
0
1705
by: motoman | last post by:
i have the following code (see below), i run my validation and get unexpected results. Public ID: null System ID: file:///C:/DATA/Sandpit/Eclipse/workspace/dtdValidation/memory.xml Line number: 4 Column number: 44 Message: Element type "memories" must be declared. Public ID: null
0
4535
by: jr | last post by:
Hello, I have got a schema file "myschema.xsd" from my customer for which I must create xml files. I used xsd.exe to create a class for the schema. I fill an object for that class with data and serialize it. My customer gave me an example xml file, how it should look like, and it begins with <?xml version="1.0" encoding="UTF-8"?>
1
7793
by: Balaji V | last post by:
Hi, I am creating C# calsses to seralize and deserialize based on xsd. When defining the classes to do seralization i need to specify the schema for the reference. Typically my class definition looks like this : public class MyClass
6
1827
by: Harry_Crow | last post by:
I have a schema file PDDSch.xsd which validates the PDD.xml file. the rootnodes are as shown below PDD.xml <PDD xmlns="http://tempuri.org/PDDSch.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-Instance" > PDDSch.xsd <xs:schema id="PDD" targetNamespace="http://tempuri.org/PDDSch.xsd" xmlns="http://tempuri.org/PDDSch.xsd"
2
1624
by: martin1 | last post by:
Hi, All, I want to add xml validation schema namespace attribute for AutoData root node(xsi:noNamespaceSchemaLocation="C:\AutoDataSchema.xsd")in the following file <AutoData > <Table1> <Data1 10 </Data1> <Data2 20 </Data2>
2
2465
by: =?ISO-8859-1?Q?Jean=2DFran=E7ois_Michaud?= | last post by:
Hello guys, I was wondering if it was possible to disregard the xsi:noNamespaceSchemaLocation. For validation it's obviously easier to have it point to say a local directory but the final xsi:noNamespaceSchemaLocation has to point to a specific location that is not local. I was wondering if it was possible to make sure that the xsi:noNamespaceSchemaLocation points to the non local location, force the parser to disregard the...
3
5405
by: Samuel | last post by:
I use the following code to create the XML from a class object Dim serialize As New System.Xml.Serialization.XmlSerializer(GetType(XYZObject)) serialize.Serialize(obWtiter, obObject) But I need the following ' xsi:noNamespaceSchemaLocation="obj-envelope.xsd"' to be included in the in the main opening tag
0
8234
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8172
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8677
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8335
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8474
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6110
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4079
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
1784
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1482
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.