473,327 Members | 1,997 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,327 software developers and data experts.

validating XML doc with multiple schemaLocation's

I am trying to validate an XML instance document that contains
elements from 2 different schema's. When I validate using .net I get
the following error
"Xml is invalid: The element http://api.onesource.com/abstract:group
has invalid child element http://api.onesource.com/schema2:assets.
Expected http://api.onesource.com/schema1:CopyrightText
http://api.onesource.com/abstract:item. An error occured at ,(1,407)

What is interesting is if I switch the order of the schema's in the
schemaLocation I get an error on the CopyrightText element. This
validates fine in XMLSpy. I have made simplified version of the
schema's we are using that are below. The full schema's come from the
XBRL committee.
Many thanks in advance to anyone who can shed some light on this
perplexing problem.

Base Schema
<?xml version="1.0"?>
<schema targetNamespace="http://api.onesource.com/abstract"
xmlns="http://www.w3.org/2001/XMLSchema"
xmlns:xbrli="http://api.onesource.com/abstract"
elementFormDefault="qualified" attributeFormDefault="qualified">
<element name="item" type="anyType" abstract="true"/>
<element name="group">
<complexType>
<choice minOccurs="0" maxOccurs="unbounded">
<element ref="xbrli:item" minOccurs="0" maxOccurs="unbounded"/>
</choice>
</complexType>
</element>
</schema>

Schema1 (CopyrightText derived from xbrli:item)
<?xml version="1.0" encoding="utf-8"?>
<schema targetNamespace="http://api.onesource.com/schema1"
xmlns:xbrli="http://api.onesource.com/abstract"
xmlns="http://www.w3.org/2001/XMLSchema"
xmlns:os1="http://api.onesource.com/schema1"
elementFormDefault="qualified" attributeFormDefault="qualified">
<import namespace="http://api.onesource.com/abstract"
schemaLocation="abstractschema.xsd"/>
<element name="CopyrightText" type="string"
substitutionGroup="xbrli:item"/>
</schema>

Schema2 (assets derived from xbrli:item)
<?xml version="1.0" encoding="utf-8"?>
<schema targetNamespace="http://api.onesource.com/schema2"
xmlns:os2="http://api.onesource.com/schema2"
xmlns="http://www.w3.org/2001/XMLSchema"
xmlns:xbrli="http://api.onesource.com/abstract"
elementFormDefault="qualified" attributeFormDefault="qualified">
<import namespace="http://api.onesource.com/abstract"
schemaLocation="abstractschema.xsd"/>
<element name="Assets" type="string"
substitutionGroup="xbrli:item"/>
</schema>

Instance document
<xbrli:group xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xbrli="http://api.onesource.com/abstract"
xmlns:os1="http://api.onesource.com/schema1"
xmlns:os2="http://api.onesource.com/schema2"
xsi:schemaLocation="http://api.onesource.com/schema1 schema1.xsd
http://api.onesource.com/schema2 schema2.xsd">
<os1:CopyrightText>string</os1:CopyrightText>
<os2:Assets>string</os2:Assets>
</xbrli:group>
Nov 12 '05 #1
0 2452

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

Similar topics

1
by: George Chatzigeorgiou | last post by:
Hi all. Since I started with .net I have this feeling, that there is no easy way of validating mulitple controls on forms, menus etc. Suppose our application has an MDI , a toolbar , a menu, and...
0
by: Adam Smith | last post by:
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...
1
by: cemcat | last post by:
Hello, We have an ASP.NET 2.0 (C#) web form that contains a textbox for users to enter multiple e-mail addresses separated by semicolons. We need to validate that each individual e-mail address...
2
by: aris1234 | last post by:
Hi All... for validation one form i know the code, but if multiple form im confused my case : I have multiple form and submit in my html code, this is sample html : <form> <select>
0
by: gnawz | last post by:
i have a multiple drop down with five items.. If i select 2 or more items and post, only one item is posted to the db! How do I make it post all the fields I have selected? The HTML list ...
2
by: forbes | last post by:
Hi, I have a form that contains multiple groups of checkboxes that act like radio buttons (at the clients insistance). There is one text field that is required and 28 checkbox groups. Here an...
0
by: Ned Balzer | last post by:
Hi, Can anyone point me in the direction of a solution for validating multiple checkboxes in an asp.net 2.0 page? 1) This is not a checkboxlist, it is a number of separate checkboxes 2) I do...
2
by: adversus | last post by:
Good evening all, I have a problem that I've been banging my head against for a few hours and was looking for some advice. Consider a table with the following data: SSN (int) first_name (char)...
1
by: lolcat | last post by:
Hi guys, new here and to javascript, I have this form that I am trying to you javascript to validate the multiple input text boxes. form as follows <form action="login.php" method="post"...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.