473,503 Members | 11,237 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

question about using the correct schema namespace

Jay
I have a Access/VBA client that exports xml to the local drive, then posts it
over http to an aspx page. The aspx page consumes it, then builds itself
based on the xml data.
This works find only if I first mannually change the root entry's namespace
url as shown below. Does anyone know how I can get the two (cleint xml
export and aspx xml consume) to work together with the appropriate namespace?

Here is the top three lines of my xml export (prior to mannually changing it):
<?xml version="1.0" encoding="UTF-8"?>
<root xmlns:xsd="http://www.w3.org/2000/10/XMLSchema"
xmlns:od="urn:schemas-microsoft-com:officedata">
<xsd:schema>

After mannually changing the root entry url it works fine with:
<root xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:od="urn:schemas-microsoft-com:officedata">

Also, below is the error my aspx page throws when it tries to read the xml.
note, this test case is reading directly from disk for debug purposes:
ERROR consumeXML getXML: System.ArgumentException: The schema namespace is
invalid. Please use this one instead: http://www.w3.org/2001/XMLSchema. at
System.Data.DataSet.ReadXml(XmlReader reader, XmlReadMode mode, Boolean
denyResolving) at System.Data.DataSet.ReadXml(XmlReader reader, XmlReadMode
mode) at PrepareI.getXmlFromDisk() in
c:\Inetpub\wwwroot\STPWS\PrepareI.aspx.cs:line 106ERROR in ////using
CrystalDecisions.Shared; Page_Load: System.ArgumentException: The schema
namespace is invalid. Please use this one instead:
http://www.w3.org/2001/XMLSchema. at PrepareI.getXmlFromDisk()

Thanks
--
Jay
Dec 20 '05 #1
1 1569


Jay wrote:

<?xml version="1.0" encoding="UTF-8"?>
<root xmlns:xsd="http://www.w3.org/2000/10/XMLSchema"
xmlns:od="urn:schemas-microsoft-com:officedata">
<xsd:schema>

After mannually changing the root entry url it works fine with:
<root xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:od="urn:schemas-microsoft-com:officedata"> Also, below is the error my aspx page throws when it tries to read the xml.
note, this test case is reading directly from disk for debug purposes:
ERROR consumeXML getXML: System.ArgumentException: The schema namespace is
invalid. Please use this one instead: http://www.w3.org/2001/XMLSchema.


The error message is clear and correct. If you want to include elements
in the W3C XML Schema (XSD) namespace then you need to use the
well-defined official
http://www.w3.org/2001/XMLSchema
URI and not http://www.w3.org/2000/10/XMLSchema which your sample has.

The W3C XML Schema specification is here
<http://www.w3.org/XML/Schema#dev>
the namespace name is defined here:
<http://www.w3.org/TR/xmlschema-1/#Instance_Document_Constructions>

So you need to change your VBA export to use the proper namespace URI.

--

Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/
Dec 20 '05 #2

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

Similar topics

2
3075
by: Sean Bright | last post by:
Hi there. I'm having a problem which I hope is a simple one... Any help would be appreciated. I think it has something to do with the way attributes are (or are not) inherited in schemas... ...
2
1279
by: AnonymousOne | last post by:
Greetings all, I'm getting a little frustrated trying to figure this out. When creating an XML schema file, the default extention is XSD. How is it that schemas can be accessed using only their...
4
3530
by: Ian | last post by:
I would like to set a path to a schema where both the xml file and the schema are on my local hard drive (e.g. c:\XML\auto.xml and c:\XML\auto.xsd) Thank you, Ian
5
1163
by: KJ | last post by:
In an Xml schema: can an element have children which come from another namespace? For example, can this be declared in the schema: <top> <anotherNamespace:a> <aThirdNamespace:b> Hello World...
2
6683
by: Ian Griffiths | last post by:
I have been given a schema, instances of which I'm required to be able to consume and generate. I'd like to be able to manipulate these instances as DataSets internally in my application. The...
1
1249
by: flycast | last post by:
I have heard that using xml for configurations on applications is a good thing. I have started to work with learning xml and have seen this "http://tempuri.org" showing up automatically when I...
0
2114
by: robert | last post by:
Hi all, I'm having a hard time resolving a namespace issue in my wsdl. Here's an element that explains my question, with the full wsdl below: <definitions name="MaragatoService"...
1
5106
by: Yewen Tang | last post by:
I have a schema file datamodel.xsd, element "properties" is declared as a type of "baseProperty". The schema file also defines "derivedProperty" is a derived type of "baseProperty". <?xml...
5
1712
by: Grant Robertson | last post by:
I am only just learning about schema basics. I am trying to understand some fundamental principles about what can be specified within a schema. If I define an enumerated list of values for an...
0
7070
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...
1
6976
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...
0
7449
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...
0
5566
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4993
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...
0
3160
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...
0
3148
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1495
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
729
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.