Altova Mailing List Archives

Re: [xml-dev] Text or tags choice with XSD

From: "Chiusano Joseph" <chiusano_joseph@---.--->
To: GARNIER Pierre <pgarnier@----.--->
Date: 9/9/2003 1:12:00 PM

This can be done with Union types [1].

Kind Regards,
Joe Chiusano
Booz | Allen | Hamilton


GARNIER Pierre wrote:
> Hi,
> Here are two <time> elements differing only in there content :
> 1)
> <doc>
>   <time>14:09<time>
> </doc>
> 2)
> <doc>
>   <time><hour>14</hour><min>09</min></time>
> </doc>
> In an XSD schema, how to indicate that the <time> element can contain text
> and only text or <hour> tag followed by <min> tag?
> I tried with a choice group containing two <time> elements with different
> types but it doesn't work : it is not possible to have two elements with the
> same name.
> Thanks.
> Pierre.
> -----------------------------------------------------------------
> The xml-dev list is sponsored by <>, an
> initiative of OASIS <>
> The list archives are at
> To subscribe or unsubscribe from this list use the subscription
> manager: <>

tel;work:(703) 902-6923
org:Booz | Allen | Hamilton;IT Digital Strategies Team
adr:;;8283 Greensboro Drive;McLean;VA;22012;
title:Senior Consultant
fn:Joseph M. Chiusano


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 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.