Velocity Reviews - Computer Hardware Reviews

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

Thread Tools

schema for different complex elements based on attribute value

Posts: n/a

I have the following xml

<child type="Single">
<!-- if type is "single", then we can have only 1 of the
following element with default for directory as "1"
<!-- More elements here -->
<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
<!-- More elements here -->

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


Reply With Quote

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? XML 2 03-06-2006 05:19 AM
Key constraint for attribute of different elements (XML schema) 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