OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   XML Schema and context-senstive datatyping

[ Lists Home | Date Index | Thread Index ]
  • From: Sam Hunting <sam_hunting@yahoo.com>
  • To: xml-dev <xml-dev@lists.xml.org>
  • Date: Wed, 04 Oct 2000 07:38:16 -0700 (PDT)

If this is a FAQ I apologize in advance.
 
Suppose I have an address that can look like this:
 
    <Address>
        <PostalCode>12345-6789</PostalCode>
        <CountryCode>US</CountryCode>
    </Address>
 
but can also look like this:
 
    <Address>
        <PostalCode>H3H-2A6</PostalCode>
        <CountryCode>CA</CountryCode>
    </Address>
 
and I want to change the datatype of <PostalCode> based on the value of
<CountryCode> so I can validate the user's entries, can I do that using
XML Schema? If so, how?
 
(One would wish to validate a Zip code for the USA, but a Canadian
Postal Code for Canada. The dataype of country code would be an
enumerated list a la ISO 3166.
 
Thanks in advance.
 
Sam Hunting


=====
<? "To imagine a language is to imagine a form of life."
    -- Ludwig Wittgenstein, Philosophical Investigations ?>

__________________________________________________
Do You Yahoo!?
Yahoo! Photos - 35mm Quality Prints, Now Get 15 Free!
http://photos.yahoo.com/




 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS