By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,887 Members | 1,214 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,887 IT Pros & Developers. It's quick & easy.

question about using the correct schema namespace

P: n/a
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
Share this Question
Share on Google+
1 Reply


P: n/a


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 discussion thread is closed

Replies have been disabled for this discussion.