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
Pierre,

This can be done with Union types [1].

Kind Regards,
Joe Chiusano
Booz | Allen | Hamilton

[1]
http://www.w3.org/TR/2001/REC-xmlschema-0-20010502/primer.html#UnionDt

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 XML.org <http://www.xml.org>, an
> initiative of OASIS <http://www.oasis-open.org>
> 
> The list archives are at http://lists.xml.org/archives/xml-dev/
> 
> To subscribe or unsubscribe from this list use the subscription
> manager: <http://lists.xml.org/ob/adm.pl>

begin:vcard 
n:Chiusano;Joseph
tel;work:(703) 902-6923
x-mozilla-html:FALSE
url:www.bah.com
org:Booz | Allen | Hamilton;IT Digital Strategies Team
adr:;;8283 Greensboro Drive;McLean;VA;22012;
version:2.1
email;internet:chiusano_joseph@b...
title:Senior Consultant
fn:Joseph M. Chiusano
end:vcard

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.