Re: Classroom critique of XML Schema 1.1 (UNCLASSIFIED)

Classification: UNCLASSIFIED

> 3. If an element has multiple inheritable attributes in its ancestors and they have the same name, only the closest one will be visible to the element. For example, suppose the <Comment> element has two xml:lang attributes (both inheritable) that are ancestors:
> 
> <Document xml:lang="FR">
>     <Chapter>
>         <Section xml:lang="EN">
>             <Comment>

As far as I know this is by design.  First, it is necessary to know your intention regarding this point, because your intention is unclear.  I presume your description of the problem points to one of these two conditions:

1) The problem is that <Comment> inherits xml:lang="EN" and not xml:lang="FR" to the point where this child element is prevented from inheriting the property or definition of this ancestor attribute.  Notice I said inheritance of a property and/or definition but not anything about access to.

2) The problem is that a reference cannot be addressed, such as in the context of XPath, from <Comment> to the ancestor attribute xml:lang="FR".  Therefore a path of access cannot be established in instance documents using XML derived technology methods.

If your problem is best described by my first interpretation then I will say this is certainly working as directed and must not be changed.  This goes to the heart of scope inheritance from instance definition and Namespace reference.  If the technology is changed in response to this one point then that inheritance model breaks.

Thanks,
Austin Cheney, CISSP
http://prettydiff.com/
Classification: UNCLASSIFIED

Received on Friday, 18 March 2011 19:36:00 UTC