Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > schema for different complex elements based on attribute value

Reply
Thread Tools

schema for different complex elements based on attribute value

 
 
user@domain.invalid
Guest
Posts: n/a
 
      07-20-2004
Hi,

I have the following xml

<rootElem>
<child type="Single">
<!-- if type is "single", then we can have only 1 of the
following element with default for directory as "1"
-->
<childOfChild>
<!-- More elements here -->
</childOfChild>
</child>
<child type="Multiple">
<!-- if type is "Multiple", then we can have more that one
of the following element. The contents of this element
is same as that of in the "Single" case
-->
<childOfChild>
<!-- More elements here -->
</childOfChild>
</child>
</rootElem>

How do i write a schema for this multiple child "type" condition, if at
all it is possible ?

Thanks
Am

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
xml schema to specify element type based on attribute value? James XML 2 07-28-2007 04:11 AM
picking value of one attribute based on a child elements attribute? XPath? vjethava@gmail.com XML 2 03-06-2006 05:19 AM
Key constraint for attribute of different elements (XML schema) tthunder@gmx.de XML 5 01-16-2006 03:04 PM
[XML Schema] Content type of complex type definition with complex content Stanimir Stamenkov XML 2 10-25-2005 10:16 AM
[XML Schema] Including a schema document with absent target namespace to a schema with specified target namespace Stanimir Stamenkov XML 3 04-25-2005 09:59 AM



Advertisments