[XMLSCHEMA-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Tagging the remainder of a body

From: Paul B. Monday <Paul.Monday@Sun.COM>
Date: Mon, 13 Feb 2006 21:12:47 -0700
To: xmlschema-dev@w3.org
Message-id: <43F158BF.5030304@sun.com>
Tagging the remainder of a body

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
Received on Tuesday, 14 February 2006 05:03:51 GMT

Subscribe to the Stylus Scoop newsletter for helpful XML tips and tutorials.
Email
First Name
Last Name
Company

Download Stylus Studio 6 XML Enterprise Edition

Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2007 All Rights Reserved.