473,232 Members | 1,539 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,232 software developers and data experts.

Help-Error validating multiple documents

Hello. I've got a total of 5 schemas. They are:

1 - 1.xsd - a description of a city
2 - 2.xsd - a description of a town
3 - CityHall.xsd - a description of a cityhall-meant to be part of a
document based on 1.xsd in "user area".
4 - TownHall.xsd - a description of a townhall-meant to be part of a
document based on 2.xsd in "user area".
5 - testmultischema.xsd - a document which combines in a batch instances
of cities and towns based upon 1.xsd and 2.xsd.

I get the following xml validation error:

ERROR: The 'http://adamExt.org:TownHall' element is not declared. An
error occur
red at file:///c:/adamtestschema/testmultischema.xml, (21, 4).

in a testmultischema doc that contains both an instance of city and
town. However, if I only have one instance of either in the testmulti
doc, it validates perfectly.

Thanks in advance.


<xsd:schema targetNamespace="http://adam.org"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://adam.org"
<xsd:element name="City" type="CityType"/>
<xsd:complexType name="CityType">
<xsd:element name="name" type="xsd:string"/>
<xsd:element name="UserAreaCity" type="UserAreaCityType"/>
<xsd:complexType name="UserAreaCityType">
<xsd:sequence minOccurs="0">
<xsd:any namespace="##other" minOccurs="0" maxOccurs="unbounded" />


<xsd:schema targetNamespace="http://adam.org"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://adam.org"
<xsd:element name="Village" type="VillageType"/>
<xsd:complexType name="VillageType">
<xsd:element name="name" type="xsd:string"/>
<xsd:element name="UserAreaTown" type="UserAreaTownType"/>
<xsd:complexType name="UserAreaTownType">
<xsd:sequence minOccurs="0">
<xsd:any namespace="##other" minOccurs="0" maxOccurs="unbounded" />

<?xml version="1.0" encoding="utf-8" ?>
<xs:schema targetNamespace="http://localhost/adamMulti.org"
elementFormDefault="qualified" id="Multiple">
<xs:import namespace="http://adam.org"
schemaLocation="http://localhost/adamtestschema/1.xsd" />
<xs:import namespace="http://adam.org"
schemaLocation="http://localhost/adamtestschema/2.xsd" />
<xs:complexType name="MessageType">
<xs:element name="Id" type="xs:integer" />
<xs:element ref="h:City" />
<xs:element ref="h:Village" />
<xs:complexType name="MessagesType">
<xs:element name="Message" type="MessageType" minOccurs="0"
maxOccurs="unbounded" />
<xs:complexType name="MultipleType">
<xs:element name="Messages" type="MessagesType" minOccurs="0" />
<xs:element name="Multiple" type="MultipleType" />

instance of testmultischema which fails validation
<?xml version="1.0" encoding="UTF-8"?>
<Multiple xmlns="http://localhost/adamMulti.org"
<City xmlns="http://adam.org"
<name>New York</name>
<CityHall xsi:schemaLocation="http://adamExt.org
City Hall Building
<Village xmlns="http://adam.org"
<TownHall xsi:schemaLocation="http://adamExt.org
Town Hall Building
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 12 '05 #1
0 1257

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

Similar topics

by: Dave | last post by:
After following Microsofts admonition to reformat my system before doing a final compilation of my app I got many warnings/errors upon compiling an rtf file created in word. I used the Help...
by: Tom | last post by:
A question for gui application programmers. . . I 've got some GUI programs, written in Python/wxPython, and I've got a help button and a help menu item. Also, I've got a compiled file made with...
by: Sarir Khamsi | last post by:
Is there a way to get help the way you get it from the Python interpreter (eg, 'help(dir)' gives help on the 'dir' command) in the module cmd.Cmd? I know how to add commands and help text to...
by: Sudheer Kareem | last post by:
Dear All Please tell me how to assosiate help files with my Vb.net Project. Regards Sudheer
by: Corepaul | last post by:
Missing Help Files When I enter "recordset" as the keyword and search the Visual Basic Help index, I get many topics of interest in the resulting list. But there isn't any information available...
by: Steve | last post by:
I have written a help file (chm) for a DLL and referenced it using Help.ShowHelp My expectation is that a developer using my DLL would be able to access this help file during his development time...
by: Mark | last post by:
I have loaded Visual Studio .net on my home computer and my laptop, but my home computer has an abbreviated help screen not 2% of the help on my laptop. All the settings look the same on both...
by: JonathanOrlev | last post by:
Hello everybody, I wrote this comment in another message of mine, but decided to post it again as a standalone message. I think that Microsoft's Office 2003 help system is horrible, probably...
by: trunxnirvana007 | last post by:
'UPGRADE_WARNING: Array has a new behavior. Click for more: 'ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?keyword="9B7D5ADD-D8FE-4819-A36C-6DEDAF088CC7"' 'UPGRADE_WARNING: Couldn't resolve...
by: hitencontractor | last post by:
I am working on .NET Version 2003 making an SDI application that calls MS Excel 2003. I added a menu item called "MyApp Help" in the end of the menu bar to show Help-> About. The application...
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...

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.