Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


RE: Derivation by restriction

From: "Jack Lindsey" <tuquenukem@-------.--->
To: Xan.Gregg@---.---, -------------@--.---
Date: 4/8/2004 2:16:00 PM
Thanks Xan.

I am in this case very pleased to be proven wrong, and I have just 
demonstrated it to myself in Spy (guess I should have done that first ;-)

I misinterpreted an example in a book I was just reading which said that the 
original model had to be replicated and then any relevant constraints 
tightened.  The example focussed on adding maxOccurs="0" to an element that 
already had minOccurs="0" to effectively eliminate it from the subtype.  I 
interpreted that to mean that original constraints also had to be replicated 
and just further qualified by additional constraints.

It did then point out that simply omitting the element from the restriction 
achieved the same result.

It also pointed out that omitting an attribute from the restriction has a 
different effect.  It means the attribute is required unchanged.  I think 
this is when I got really confused.  Perhaps I should just read the 
spec....then again!

Cheers Jack


>From: "Xan Gregg" <Xan.Gregg@j...>
>To: "Jack Lindsey" <tuquenukem@h...>,<xmlschema-dev@w...>
>Subject: RE: Derivation by restriction
>Date: Thu, 8 Apr 2004 16:30:08 -0400
>
>Your premise is incorrect.  You can have a restriction that makes an 
>optional element mandatory.  Or is there some other constraint involved 
>that is not apparent in your message?
>
>xan
>
>-----Original Message-----
>From:  Jack Lindsey
>Sent: Thursday, April 08, 2004 4:24 PM
>To: xmlschema-dev@w...
>Subject: Derivation by restriction
>
>Would I be correct in concluding that when deriving a complex type by
>restriction, while it is possible to make an optional attribute mandatory 
>in
>the subtype, it is not possible to make the presence of an element
>mandatory?
>
>If so, why not?  If this does not offend the concept of inheritance
>overriding in the case of an attribute why has this facility not been
>implemented for elements?

_________________________________________________________________
Tax headache? MSN Money provides relief with tax tips, tools, IRS forms and 
more! http://moneycentral.msn.com/tax/workshop/welcome.asp

From jddahl@m...  Fri Apr  9 17:58:32 2004
Return-Path: <jddahl@m...>


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