Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: Re-using a simple type definition; with enumeration constraint and without enumeration constraint

From: Pavel Lepin <p.lepin@-------.--->
To: NULL
Date: 2/1/2008 10:10:00 AM


Please don't top-post. Fixed.

puvit82 <puvising@g...> wrote in
<5ec7e626-5e39-495a-96dc-4f76405b9c3e@q...>:
> On Jan 31, 2:35 am, Pavel Lepin <p.le...@ctncorp.com>
> wrote:
>> puvit82 <puvis...@gmail.com> wrote:
>> > Lets suppose that I have defined a simpleType
>> > "addressType" with 3 enumeration values (Home, Office,
>> > Vacation) that restrict data entry. I want to use this
>> > simpleType in 2 different unrelated complexType
>> > definitions, lets call them "personalAddress" and
>> > "companyAddress"
>>
>> > How will I be able to use "addressType" inside
>> > "personalAddress" such that the 3 enumeration values
>> > are taken into consideration, i.e. data entry is
>> > restricted to either one of those three enumeration
>> > values and also use the same "addressType" inside
>> > "companyAddress" such that the enumeration values are
>> > not considered and the user can enter a completely
>> > different value for addressType (such as "HomeOffice"
>> > and the schema validates the XML file)?
>>
>> It's in no way the "same simple type" if in one case it's
>> an enumeration, and in the other case it isn't. Why do
>> you want to use the same type name to designate two
>> vastly different things? To introduce some unnecessary
>> confusion?
>
> pavel, i want to be able to use the same schema type
> because the schema is set and has been communicated to the
> recipients; making a change now will cause them to have to
> update their schema and their mapping code (which is
> something i want to avoid)

You're missing the point. The types are different. You
cannot refer to two different types by just one name.
Either define two types, or use one unconstrained type and
check constraints on the application side.

-- 
<>There is no phenotype</>


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