Altova Mailing List Archives>Archive Index >xmlschema-dev Archive Home >Recent entries >Thread Prev - RE: E rcase-RecurseLax.1: Group's occurrence range, (1,unbounded), is not a valid restriction of base group's occurrence range, (1,1). >Thread Next - How to consolidate multiple xsd files? Tagging the remainder of a bodyTo: xmlschema-dev@--.--- Date: 2/13/2006 2:13:00 PM
I'm trying to leave a "type" tag in a body that determines the latter
half of an XML instance. I can't find a decent way to do this but am
thinking I'm tackling the problem wrong from the outset. Basically, I
want to be able to enforce that if a type is "Event", the latter half of
the message has an event but if the type is "Contact", the latter half
of the message has contact information...like this:
<message>
<type>Event</type>
<event>
<stuff></stuff>
</event>
</message>
<message>
<type>Contact</type>
<contact-information>
<address></address>
</contact-information>
</message>
Am I approaching this wrong for XML? Is there anyway to constrain the
following nodes like this? selector, nor choice seem to allow this
linkage to occur...I'm not necessarily "new" to schema, but neither am I
"advanced" in schema...so apologies if this question seems naive...
Paul Monday
Sun Microsystems
From petexmldev@t... Tue Feb 14 08:49:45 2006
Received: from m | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
