XML Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreXML Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old February 23rd, 2004, 04:54 PM
dsetzer dsetzer is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2004
Posts: 2 dsetzer User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 4 m 43 sec
Reputation Power: 0
Question Xerces Schema Validation Error

I have a schema (actually 2, 1 included in another). As far as I can tell, all of my schemas match-up.

And, as far as I can tell, the files are valid. I have tested the schema validation from within XMLSpy and from within a VB application using the MSXML parser. All confirm that the XML files conform to the schemas.

I'm getting an error in a Java program that I'm working on using the Xerces processor. As far as I can tell, it's a 1.x version.

I know the actual code for the schema validation is proper because other schema files validate just fine (I've noticed that they don't have specific namespaces defined).

The error message is:
General Schema Error: Schema in file:/C:/SchemaValidation/Schemas/MyCompany_v3_0.xsd has a different target namespace from the one specified in the instance document :.

My schema:
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema targetNamespace="urn:us:my:company" xmlns:myco="urn:us:my:company" xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified" version="3.0">
<xs:include schemaLocation="Common_v3_0.xsd"/>
<xs:element name="SubmissionGroup" type="myco:SubmissionGroupType">
... schema stuff here ...
</xs:element>
<xs:element name="SystemRecordCountValues" type="nei:SystemRecordCountValuesType"/>
</xs:schema>

My XML file:
<?xml version="1.0" encoding="UTF-8"?>
<SubmissionGroup xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:us:my:company" xsi:schemaLocation="urn:us:my:company MyCompany_v3_0.xsd" schemaVersion="1.1">
<SystemRecordCountValues schemaVersion="1.1">
... valid xml document ...
</SystemRecordCountValues>
</SubmissionGroup>

Any ideas?

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreXML Programming > Xerces Schema Validation Error


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway