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

Recusive elements

Hi all,

Struggling at the moment so I'm wondering if any one can help me out.

I'm creating a *.xsd schema where and would like define certain elements as
recursive
for example...

<class>
<info />
<class>
<info />
<class>
<info />
...and so on
</class>
</class>
</class>

The exact depth is unknown as I what the structure to be as flexible as
possible.
Any help out there would be greatly appreciated.

Kind regards.
rmaloney
Nov 12 '05 #1
2 1084
hi,
maybe thi way?

<xs:complexType name="classType">
<xs:sequence>
<xs:element ref="info"/>
<xs:element name="class" type="classType" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
johannes

"Randy Maloney" <r.*******@zen.co.uk> wrote in message
news:Ov**************@TK2MSFTNGP09.phx.gbl...
Hi all,

Struggling at the moment so I'm wondering if any one can help me out.

I'm creating a *.xsd schema where and would like define certain elements
as recursive
for example...

<class>
<info />
<class>
<info />
<class>
<info />
...and so on
</class>
</class>
</class>

The exact depth is unknown as I what the structure to be as flexible as
possible.
Any help out there would be greatly appreciated.

Kind regards.
rmaloney

Nov 12 '05 #2
Or this...

<?xml version="1.0" encoding="utf-8" ?>
<xs:schema id="Test" targetNamespace="http://tempuri.org/Test.xsd"
elementFormDefault="qualified"
attributeFormDefault="qualified" xmlns="http://tempuri.org/Test.xsd"
xmlns:mstns="http://tempuri.org/Test.xsd"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">

<xs:element name="class">
<xs:complexType>
<xs:sequence>
<xs:element name="info"/>
<xs:element ref="class" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
</xs:element>

</xs:schema>

"Randy Maloney" wrote:
Hi all,

Struggling at the moment so I'm wondering if any one can help me out.

I'm creating a *.xsd schema where and would like define certain elements as
recursive
for example...

<class>
<info />
<class>
<info />
<class>
<info />
...and so on
</class>
</class>
</class>

The exact depth is unknown as I what the structure to be as flexible as
possible.
Any help out there would be greatly appreciated.

Kind regards.
rmaloney

Nov 12 '05 #3

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

Similar topics

19
by: deko | last post by:
I'm kind of lost on this one - I need to modify 2 files based on user input: $data_array = file($data_file); $counter_array = file($counter_file); // There is a line-for-line relationship...
1
by: Wolfgang Lipp | last post by:
my question is: do we need container elements for repeating elements in data-centric xml documents? or is it for some reason very advisable to introduce containers in xml documents even where not...
0
by: Wolfgang Lipp | last post by:
From: Lipp, Wolfgang Sent: Tuesday, 27?January?2004 13:26 <annotation> the first eleven contributions in this thread started as an off-list email discussion; i have posted them here with...
8
by: Generic Usenet Account | last post by:
To settle the dispute regarding what happens when an "erase" method is invoked on an STL container (i.e. whether the element is merely removed from the container or whether it also gets deleted in...
34
by: Adam Hartshorne | last post by:
Hi All, I have the following problem, and I would be extremely grateful if somebody would be kind enough to suggest an efficient solution to it. I create an instance of a Class A, and...
1
by: Howard Jess | last post by:
Apparently, form elements of type <input type="image" src="...> are not included in the form's elements collection. I don't understand why not; according to DOM2, all form control elements...
22
by: Luke | last post by:
Elements with name attribute: form, input, textarea, a, frame, iframe, button, select, map, meta, applet, object, param, img (if you know more reply...) Methods of addresing html elements:...
37
by: Prisoner at War | last post by:
Actually, it doesn't have to be a blockquote...but I'm at my wits' end: I want to make bold several lines of text which have a pair of <br /tags between them...seems like the <b></bdo not "carry...
0
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...
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...
1
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: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
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.