Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Is this possible using XML Schema

Status
Not open for further replies.

Frink

Programmer
Mar 16, 2001
798
GB
Hallo,

Can the following XML structure be defined in XML Schema:

I have a set of action elements, each action has a criteria sub-element with a time attribute, and a parameter sub-element.
The parameter sub-element attributes are limited to a defined set for each action, i.e. the attributes for action1 might be:
volume="2"
or
height="1" length="4" depth="3"
for action2 the attributes might be:
span="12"
or blank


<action1>
<criteria time="2">
<parameter attributes>
<action3>
<criteria time="10">
<parameter attributes>
<action1>
<criteria time="20">
<parameter attributes>
<anotheraction>
<criteria time="10">
<parameter attributes>
<anotheraction>
<criteria time="10">
<parameter attributes>
<anotheraction>
<criteria time="10">
<parameter attributes>
<smallaction>
<criteria time="10">
<parameter attributes>
<action1>
<criteria time="102">
<parameter attributes>
<action1>
<criteria time="12">
<parameter attributes>

I want to be able to define it so that only allowed combinations of parameter attributes are allowed.

Hopefully that's explained it well enough. I'm afraid I'm new to this.

- Pete
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top