Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

including multiple schemas

Status
Not open for further replies.

Kalisto

Programmer
Feb 18, 2003
997
GB
I have a syntax error in my code for importing schemas' but I cant see it.

Code:
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="[URL unfurl="true"]http://www.w3.org/2001/XMLSchema"[/URL] 
xmlns:BTDictionary="[URL unfurl="true"]http://localhost/BT_XML/Dictionary"[/URL] 
xmlns:BTDoc="[URL unfurl="true"]http://localhost/BT_XML"[/URL] 
targetNamespace="[URL unfurl="true"]http://localhost/BT_XML/Dictionary"[/URL]
 elementFormDefault="qualified">

	<xsd:import namespace="[URL unfurl="true"]http://localhost/BT_XML"[/URL] schemaLocation="documentationSchema.xsd"/>

On its own, the schema validates.

When I try to use it wihtin a xml file to validate it, It complains that the schema contains a namespace error, and that I cannot import into the existing namespace. Changing the namespace though, just makes the xsd invalid!

the xml file header is
Code:
<BTDictionary:dictionary xmlns:BTDictionary="[URL unfurl="true"]http://localhost/BT_XML"[/URL]  
	xmlns:xsi="[URL unfurl="true"]http://www.w3.org/2001/XMLSchema-instance"[/URL]
	xsi:schemaLocation = "[URL unfurl="true"]http://localhost/BT_XML[/URL] dictionarySchema.xsd">

Any help welcome :)

K
 
What proggy are you using to validate the schema's, and what code are you using to import the schema's.

I had some grief when trying to add multiple schema's to a vb.net schema collection (.net runtime 1.1), when the XSD's relied on chameleon includes..


------------------------
Hit any User to continue
 
Thanks, but Ive fixed it, there was an error elsewhere, and the free schema prog they have here didnt pick it up. I ended up installing XmlSpy, adn that sorted it straight away, cheers.

K
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top