473,790 Members | 2,734 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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:Tow nHall' 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.

1.xsd
-----

<xsd:schema targetNamespace ="http://adam.org"
xmlns:xsd="http ://www.w3.org/2001/XMLSchema" xmlns="http://adam.org"
elementFormDefa ult="qualified" >
<xsd:element name="City" type="CityType"/>
<xsd:complexTyp e name="CityType" >
<xsd:sequence >
<xsd:element name="name" type="xsd:strin g"/>
<xsd:element name="UserAreaC ity" type="UserAreaC ityType"/>
</xsd:sequence>
</xsd:complexType >
<xsd:complexTyp e name="UserAreaC ityType">
<xsd:sequence minOccurs="0">
<xsd:any namespace="##ot her" minOccurs="0" maxOccurs="unbo unded" />
</xsd:sequence>
</xsd:complexType >
</xsd:schema>

2.xsd
------

<xsd:schema targetNamespace ="http://adam.org"
xmlns:xsd="http ://www.w3.org/2001/XMLSchema" xmlns="http://adam.org"
elementFormDefa ult="qualified" >
<xsd:element name="Village" type="VillageTy pe"/>
<xsd:complexTyp e name="VillageTy pe">
<xsd:sequence >
<xsd:element name="name" type="xsd:strin g"/>
<xsd:element name="UserAreaT own" type="UserAreaT ownType"/>
</xsd:sequence>
</xsd:complexType >
<xsd:complexTyp e name="UserAreaT ownType">
<xsd:sequence minOccurs="0">
<xsd:any namespace="##ot her" minOccurs="0" maxOccurs="unbo unded" />
</xsd:sequence>
</xsd:complexType >
</xsd:schema>

testmultischema .xsd
-------------------
<?xml version="1.0" encoding="utf-8" ?>
<xs:schema targetNamespace ="http://localhost/adamMulti.org"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns="http://localhost/adamMulti.org"
xmlns:h="http://adam.org"
elementFormDefa ult="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:complexTy pe name="MessageTy pe">
<xs:sequence>
<xs:element name="Id" type="xs:intege r" />
<xs:choice>
<xs:element ref="h:City" />
<xs:element ref="h:Village" />
</xs:choice>
</xs:sequence>
</xs:complexType>
<xs:complexTy pe name="MessagesT ype">
<xs:sequence>
<xs:element name="Message" type="MessageTy pe" minOccurs="0"
maxOccurs="unbo unded" />
</xs:sequence>
</xs:complexType>
<xs:complexTy pe name="MultipleT ype">
<xs:sequence>
<xs:element name="Messages" type="MessagesT ype" minOccurs="0" />
</xs:sequence>
</xs:complexType>
<xs:element name="Multiple" type="MultipleT ype" />
</xs:schema>

instance of testmultischema which fails validation
--------------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<Multiple xmlns="http://localhost/adamMulti.org"
xmlns:xsi="http ://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocat ion="http://localhost/adamMulti.org
http://localhost/adamtestschema/testmultischema .xsd">
<Messages>
<Message>
<Id>1</Id>
<City xmlns="http://adam.org"
xmlns:xsi="http ://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocat ion="http://adam.org
http://localhost/adamtestschema/1.xsd">
<name>New York</name>
<UserAreaCity >
<CityHall xsi:schemaLocat ion="http://adamExt.org
http://localhost/adamtestschema/CityHall.xsd"
xmlns="http://adamExt.org">
City Hall Building
</CityHall>
</UserAreaCity>
</City>
</Message>
<Message>
<Id>2</Id>
<Village xmlns="http://adam.org"
xmlns:xsi="http ://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocat ion="http://adam.org
http://localhost/adamtestschema/2.xsd">
<name>Ramapo</name>
<UserAreaTown >
<TownHall xsi:schemaLocat ion="http://adamExt.org
http://localhost/adamtestschema/TownHall.xsd"
xmlns="http://adamExt.org">
Town Hall Building
</TownHall>
</UserAreaTown>
</Village>
</Message>
</Messages>
</Multiple>
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 12 '05 #1
0 1284

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

Similar topics

21
6561
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 Workshop program: hcw.exe that's included with Visual Basic. This exact same file compiled perfectly with no notes, warnings or errors prior to reformatting my system. Prior to the reformatting, I copied the help.rtf file onto a CD and checked the box to...
9
4415
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 the microsoft HTML workshop utility, lets call it c:\path\help.chm. My question is how do you launch it from the GUI? What logic do I put behind the "help" button, in other words. I thought it would be os.spawnv(os.P_DETACH,...
4
3357
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 cmd.Cmd but I would also like to get the man-page-like help for classes and functions. Does anyone know how to do that? Thanks. Sarir
2
6487
by: Sudheer Kareem | last post by:
Dear All Please tell me how to assosiate help files with my Vb.net Project. Regards Sudheer
7
5392
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 from clicking on many of the available topics (mostly methods but some properties are also unavailable). This same problem occurs with many, if not most, keywords. Is there any way I can activate these "missing" help topics? HELP!
5
3281
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 using "F1" help within the VB IDE. Is this expectation achievable In trying to test my help file in the IDE, I have a solution with 2 projects: the DLL and a tester. VB does not look for my help file; instead, it looks for path to my source code...
8
3237
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 including search the internet for help, but the help is worthless. Any ideas?
10
3367
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 the worst I ever seen. I almost cannot find anything I need, including things I
1
6140
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 default property of object Label. Click for more: 'ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"' Label = New Object(){Box1, Box2, Box3, Box4, Box5, Box6, Box7, Box8, Box9, Box10, Box11,...
0
2895
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 calls MS Excel, so the scenario is that I am supposed to see the Excel Menu bar, FILE EDIT VIEW INSERT ... HELP. I am able to see the menu bar, but in case of Help, I see the Help of Excel and help of my application, both as a submenu of help. ...
0
9666
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10413
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10200
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10145
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9021
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7530
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5551
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3707
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2909
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.