Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


RE: Tagging the remainder of a body

From: "Michael Kay" <mike@--------.--->
To: "'Paul B. Monday'" <Paul.Monday@---.--->, <xmlschema-dev@--.--->
Date: 2/14/2006 9:39:00 AM
XMLSchema defines a magic attribute xsi:type that can be used for this kind
of purpose. Unfortunately you can't use your own element/attribute or define
its range of values: this is one of the fundamental constraints of the XML
Schema specification.

Michael Kay
http://www.saxonica.com/ 



> -----Original Message-----
> From: xmlschema-dev-request@w... 
> [mailto:xmlschema-dev-request@w...] On Behalf Of Paul B. Monday
> Sent: 14 February 2006 04:13
> To: xmlschema-dev@w...
> Subject: 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
> 
> 
> 



From Daniel.Dui@u... Tue Feb 14 11:48:22 2006
Received: from wiggum.w3.org ([128.30.52.2


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent