Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: [XML Schema 1.1] applies only to the children, not

From: "C. M. Sperberg-McQueen" <cmsmcq@-------------.--->
To: "Costello, Roger L." <costello@-----.--->
Date: 6/3/2009 11:16:00 PM
On 3 Jun 2009, at 12:41 , Costello, Roger L. wrote:
>
> Extension elements can only be added before and after the *children*  
> of Book. Extension elements cannot be added around the  
> *grandchildren* of Book. Thus, extension elements cannot be added  
> before or after <FirstName> and <LastName>.
>
> Is this correct?

It depends on whether the enclosing schema element has
a 'defaultOpenContent' child or not.

If it does not (which is what I assume you had in mind),
then your description will be correct.

But just for completeness, I will add a pedantic note:

If the schema element does have a defaultOpenContent child,
then the complex type for Author (i.e. the one whose SCD is / 
schemaElement::Book/type::*/schemaElement::Author/type::*)
also has open content and thus allows extension elements
among the grandchildren of Book.

Just as the content model for any complex type describes
its children, not all of its descendants, so similarly the
open content for any complex type determines whether
additional elements are allowed among the children and
does not constrain the grandchildren to do it the same way.
For any type T declared in a schema element D, you can
know whether instances of T accept open content by looking
at the declaration for T and the enclosing schema element
D -- you do not need to look at every type which could
conceivably be assigned to an ancestor of an element
typed T.

I hope this helps.

-- 
****************************************************************
* C. M. Sperberg-McQueen, Black Mesa Technologies LLC
* http://www.blackmesatech.com
* http://cmsmcq.com/mib
* http://balisage.net
****************************************************************







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