Validate XML - Unable to add Schema to Schema Collection for Complex Schema

I have some xml validation code that validates xml against an external schema. Problem is that it doesn't entirely work for some of the complex OTA (www.opentravel.org) xsd that I am trying to validate against. These schemas have multiple included schemas and refernces to other schemas and attribute groups.

When I try to add one of these schemas to my schemacollection it errors out because it is unable to find some of the types defined in the included schemas. It seems to do fine going down one level to a referenced schema, but once that schema references another schema that is when I get errors.
The schema I am specifically trying to validate against is OTA_TravelItineraryRS.xsd, I am using the supplied sample xml file, but when I validate it throws up an error in one of the included schemas about "Type 'Money' is not declared or not a simple type. An error occurred at file:///C:/Delete/OTA_CommonTypes.xsd, (85, 4). " I have tried other OTA schemas and sample files and get very similar errors.
All of the schemas are locally in the same directory. To get to this error essentially the OTA_TravelItineraryRS.xsd includes other schemas one of which is OTA_CommonTypes.xsd. The money type that the error is talking about is found in OTA_SimpleTypes.xsd which is referenced by OTA_CommonTypes.xsd (technically 2 files deep).
Everything pans out and the code seems to be smart enough to drill down to CommonTypes schema to get info for the TravelItinerary, but once there it needs to drill down to SimpleTypes and for some reason its not doing it. Any ideas?
If you need more info let me know. You should be able to download the entire OTA 2004B schema that includes all the xsd and sample xml files if you want to try it out for yourself here http://www.vbforums.com/attachment.php?attachmentid=33033
0
coenen
12/28/2004 8:56:08 PM
asp.net.xml-datasource 7181 articles. 0 followers. Follow

1 Replies
936 Views

Similar Articles

[PageSpeed] 15

Did you ever figure this out? I am getting a similar error.
0
JackPDiddly
9/15/2005 9:08:38 PM
Reply:

Similar Artilces:

Adding a XML schema to XML schema collection
I used SSEUtil to add a schema to my database but I am having problems.  Used these steps:SSEUtil -c> USE "c:\Rich.mdf"> GO>!RUN Resume.SQL//indicates success>SELECT * FROM SYS.XML_SCHEMA_COLLECTIONS>GO//schema not shown in list> USE master>GO>SELECT * FROM SYS.XML_SCHEMA_COLLECTIONS>GO//schema is shown in the queryIt appears that the schema is not added to the desired database, so when I try to use the schema in Visual Studio, the schema does not appear when I connect to the Rich.mdf database.  Any ideas on what I am doing wrong or why this might be happ...

XML Schema not Validating XML Fragment
I'm trying to validate the following xml  fragment (Figure A.) against a schema document (Figure B.) that i have created and tested through a seperate XML Validator utility that so i know that the validation works outside of the asp.net code (Figure C.). The validation does return XML exceptions for well-formed stcructure but doesn't return any schema validation exceptions if i force an error in the xml. Any ideas why the XML fragment isn't being validated by the schema??? I've tried just about everything :( ========================= A. XML Fragment to Validate =========...

Validating XML file with XML schema
I want to be able to edit an XML file in browser. I open the XML file, read its contents and put it into a multi-line textbox for the user to edit it. Now, when the user wants to save the changes by pressing the save -button, I want to check if the XML data still is valid. For this I think the XML schema is perfect, right? Now, how can I write an function that takes a string parameter (which contains the whole XML file data from the textbox) and validates it against a schema file? I created the schema by passing a 100% valid XML file to the Visual Studio´s "Create Schema" tool. The...

XMLParseFile: Validating XML File Against XML Schema
I am having problems using the XMLParseFile function to validate an XML file against an XML Schema generated by a source external to our organization. The XML file and XML Schema are stored locally in the same directory. Scenario as follows: 1. Schema received as an Email attachment from an outside source (i.e. external to our organization). 2. Attachment saved to disk: C:\myDirectory\schemaDoc.xsd 3. XML file generated from an external source datawindow using SaveAs method: C:\myDirectory\xmlDoc.xml 4. XMLParseFile first used to c...

write to a xml with a xml schema
Hi, I have a xml schema, and a xml that validate this schema.I want to append new nodes to this xml with code (c#)which is the best form to do this?thanks...

Xml schema to Xml file
Is it possible to convert xml schema to xml file.How can i do read&writexmlschema using a dataset with xml schema. I converted a xml file to xml schema in a web appliction project.Then what should be location of shema that i need to give for a dataset I mean dataset.readxmlscheme(server.mappath(??))   Please let me know I am new to this field     dataset.ReadXml(Server.MapPath("xml\ProductList.xml")) will read the xml as well as the schema of thexml file. no need to convert it into schema file while using dataset as it will automatically define the ...

Xml Schema from xml file
How should i create xml schema from xml file?  Do you mean an XSD?  That's easy--open the XML file in Visual Studio.  There will be a new XML menu button, and one option is to create an XSD.  If you have a lot of files, MS has a little tool at http://msdn.microsoft.com/en-us/vbasic/bb840042.aspx.If my post is your answer, please mark it as the answer. It will bring good karma.Crystal AllianceMy BlogFlorist Blogs  Thanks alot!!  It worked wonderfully...

Use an XML Schema to validate an XML files that contains includes.
Is there a way to validate an XML file that is made up by including several other XML files using an XML schema?     Yes, you need to set the included schemas with XmlSchema.Includes property. Pls take a look at: http://msdn2.microsoft.com/en-us/library/system.xml.schema.xmlschema.includes.aspxNOTE:If you find my response contains a reference to a third party World Wide Web site, I am providing this information as a convenience to you.Microsoft does not control these sites and has not tested any software or information found on these sites; therefore,Microsoft cannot make any...

XML & XML Schema
 Hi Can I use XML natively instead of a XML Schema.The schema is very simple and I would like to see if it's possible to use just XML. <!--W3C Schema generated by XMLSpy v2007 (http://www.altova.com)--> <!--Please add namespace attributes, a targetNamespace attribute and import elements according to your requirements--> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"> <xs:import namespace="http://www.w3.org/XML/1998/namespace"/> <xs:element name="issue"> <...

superreview cancelled: [Bug 223097] Interface for checking a Node against a XML Schema type : [Attachment 172012] Doesn't require a loaded schema file if the type to validate against is a built-in ty
Doron Rosenberg (IBM) <doronr@gmail.com> has cancelled Doron Rosenberg (IBM) <doronr@gmail.com>'s request for superreview: Bug 223097: Interface for checking a Node against a XML Schema type https://bugzilla.mozilla.org/show_bug.cgi?id=223097 Attachment 172012: Doesn't require a loaded schema file if the type to validate against is a built-in type. https://bugzilla.mozilla.org/attachment.cgi?id=172012&action=edit ...

superreview denied: [Bug 223097] Interface for checking a Node against a XML Schema type : [Attachment 166886] Minor cleanup and adding some more null checks, also added schema validation test files.
Peter Van der Beken <peterv@propagandism.org> has denied Doron Rosenberg (IBM) <doronr@gmail.com>'s request for superreview: Bug 223097: Interface for checking a Node against a XML Schema type https://bugzilla.mozilla.org/show_bug.cgi?id=223097 Attachment 166886: Minor cleanup and adding some more null checks, also added schema validation test files. https://bugzilla.mozilla.org/attachment.cgi?id=166886&action=edit ------- Additional Comments from Peter Van der Beken <peterv@propagandism.org> I've stopped reviewing for now. Some general comments: - Y...

superreview requested: [Bug 223097] Interface for checking a Node against a XML Schema type : [Attachment 172012] Doesn't require a loaded schema file if the type to validate against is a built-in ty
Doron Rosenberg (IBM) <doronr@gmail.com> has asked Peter Van der Beken <peterv@propagandism.org> for superreview: Bug 223097: Interface for checking a Node against a XML Schema type https://bugzilla.mozilla.org/show_bug.cgi?id=223097 Attachment 172012: Doesn't require a loaded schema file if the type to validate against is a built-in type. https://bugzilla.mozilla.org/attachment.cgi?id=172012&action=edit ------- Additional Comments from Doron Rosenberg (IBM) <doronr@gmail.com> Doesn't require a loaded schema file if the type to validate against is a b...

How does XML Schema validates??
Hi Experts, I have a very simple question. Suppose I create a XML Schema to validate a XML file. How do I process(validate) the XML file using that schema? I mean where will the XML schema show error incase there is some inconformity in the XML file.   I tried creating the XSD and XML instance like shown below:   <<XMLSchema1.xsd>> <?xml version="1.0" encoding="utf-8" ?> <xs:schema xmlns="http://jatt.com" targetNamespace="http://jatt.com" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">   ...

Validate XML against Schema
How can I validate XML against the schema which is non-deterministic. I tried XmlValidatingReader vr = null; vr = new XmlValidatingReader(new XmlTextReader(new StringReader(resString))); vr.Schemas.Add(null, new XmlTextReader(new StringReader(txtValidXml.Text))); vr.ValidationType = ValidationType.Schema; But it is throwing exception when i try to add a schema to XML. Thanks...

xml schema validation
Hai I am having an xml file named XMLFile<?xml version="1.0"?> <note><to>Tove</to> <from>Jani</from><heading>Reminder</heading> <body>Don't forget me this weekend!</body> </note> I have created schema for that file XMLSchema.xsd <?xml version="1.0" encoding="utf-8"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.w3schools.com" xmlns="http://www.w3schools.com"elementFormDefault="qualified">...

Web resources about - Validate XML - Unable to add Schema to Schema Collection for Complex Schema - asp.net.xml-datasource

Brogdale Farm - home of the National Fruit Collection - a great day out in Kent
Brogdale Farm, home of the National Fruit Collection Kent tourist attraction. A great day out for all the family with local produce, healthy ...

National Fruit Collection
The is one of the largest fruit collections in the world and includes over 3,500 named Apple, Pear, Plum, Cherry, Bush fruit, Vine and Cob Nut ...

Liszt Collection - Wikipedia, the free encyclopedia
The Liszt Collection contains over one million, generally nineteenth-century engravings and images. The Liszt Collection is an international ...

Meet the biodiesel scam artist with a $15M art collection
Filed under: Government/Legal , Green , Read This , Auctions , Biodiesel The $15-million collection of confiscated art from a biodiesel fraudster ...

"The 2015 Black List, a collection of Hollywood's best unproduced screenplays, was announced Monday..." ...
" Bubbles , by Isaac Adamson, topped the list with 44 votes. It centers on a baby chimp that’s adopted by Michael Jackson." Narrating his own ...

Lender EZCORP Must Pay $10M In Refunds, Fines For Illegal In-Person Debt Collection Practices
A small-dollar lender has been slammed with a top-dollar penalty by federal regulators who say that the company’s debt collection practices violated ...

Hearing On CFPB Bulk Data Collection Raises Consumer Safety Concerns
'The Bureau is free to do whatever it wants within the broadest imaginable interpretation of its authority'

Have a quick look at the Mega Man Legacy Collection 3DS themes
Mega Man Legacy Collection is just around the corner on 3DS. Although it was released on PS4, Xbox One, and PC earlier this year, it's still ...

Alexandre Vauthier Launches Shoe Collection That Is #MADE-for-walking
“Darling, the legs aren't so beautiful, I just know what to do with them,” said Marlene Dietrich, the mesmerizing movie star of 1940s cinema. ...

Netherlands museum removing 'offensive' language from online collection
Netherlands museum removing 'offensive' language from online collection

Resources last updated: 12/21/2015 12:26:43 PM