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

suggestions for strange schema

I need a bit of help defining a schema to validate some xml. I can't figure out how to get it to work; I believe I need the combined functionality of something like these two type definitions. Some sample xml is below. There is a comment node that describes the possible variations in the document.

<xs:complexType name="DataType">
<xs:all minOccurs="0">
<xs:element name="singleInstanceElement1" minOccurs="0"/>
<xs:element name="singleInstanceElement1" minOccurs="0"/>
</xs:all>
</xs:complexType>

<xs:complexType name="DataType">
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="repeatableElement1" minOccurs="0"/>
<xs:element name="repeatableElement2" minOccurs="0"/>
</xs:choice>
</xs:complexType>


<?xml version="1.0" encoding="utf-8"?>
<!--
elements within data are not ordered
single instance elements may appear 0 or 1 time within data
repeatable elements may appear an arbitrary number of times
-->
<data>
<singleInstanceElement1></singleInstanceElement1>
<repeatableElement1></repeatableElement1>
<repeatableElement2></repeatableElement2>
<singleInstanceElement2></singleInstanceElement2>
<repeatableElement1></repeatableElement1>
</data>
Nov 17 '06 #1
0 892

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: C. M. Sperberg-McQueen | last post by:
wooks (wookiz@hotmail.com) wrote: > <?xml version='1.0'?> > <userlogin xmlns="urn:faster:userlogin" > xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'> > <login>mick</login> > ...
0
by: Charles Fineman | last post by:
I've been asked to look over an integration toolkit that has a bunch of schemas to specify message format. There are a couple of strange things I noticed right off the bat and I wanted to get...
2
by: Arthur | last post by:
I've come across some strange xml, that I need to deal with, it looks like this:- <root> <foo attr="1">Some random strange text. <bar attr="2">blar</bar> <bar attr="3">blar blar</bar> <bar...
3
by: Bill C. | last post by:
Hi, I've got a simple console app that just reads an XML file into a DataSet then prints out a description of each table in the DataSet, including column names and row values for each column. ...
1
by: Cesar | last post by:
Hello, I've developed a .NET C# web service; which has one method named, let's say, upload_your_data. This method has one parameter ( string your_data). The value that this parameter will...
0
by: Derek | last post by:
I am creating an intranet using Visual Web Developer Express Edition. Everything has been working OK until yesterday when I started getting 62 messages all beginning "Could not find schema...
2
by: jan_bar | last post by:
Hi, My VS.NET 2005 displays strang validation warning on xsi:SchemaLocation: The attribute 'http://www.w3.org/2001/XMLSchema-instance:SchemaLocation' does not match one of the four allowed...
3
by: annecarterfredi | last post by:
I was getting snapshot since the database was responding very slow...here is the query that was in a snapshot: WITH TYPEINTS ( TYPEINT, COLTYPE ) AS ( VALUES ( SMALLINT(1 ), CHAR( 'INTEGER', ...
2
by: pankaj_wolfhunter | last post by:
Greetings, Now this query is making me crazy. Working on it for almost 2 hrs but no output Query: SELECT ACTIONEMAILTRANSID \ ,ITEMTRANSID \ ,COMPANYID \ ,UPDATEDDATE \
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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,...
0
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...

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.