Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Why is XPath2 being so explicit about types of substitution grp members?

From: Soren Kuula <dongfang@--------.-->
To: xml-dev@-----.---.---
Date: 2/8/2006 2:15:00 AM
Hi,

As I understand it, XML Schema substitution grp members always must have 
a type that is derived from that o the head:

"
All such members must have type definitions which are either the same as 
the head's type definition or restrictions or extensions of it. 
Therefore, although the names of elements can vary widely as new 
namespaces and members of the substitution group are defined, the 
content of member elements is strictly limited according to the type 
definition of the substitution group head.
"

Cool, but there must be a reason for the XPath2 spec to reapeat that? 
schema-element:

   1.

      The name of the candidate node matches the specified ElementName
      <http://www.w3.org/TR/xpath20/#doc-xpath-ElementName> or matches
      the name of an element in a substitution group
      <http://www.w3.org/TR/xpath20/#dt-substitution-group> headed by an
      element named ElementName
      <http://www.w3.org/TR/xpath20/#doc-xpath-ElementName>.

   2.

      |derives-from(|/AT, ET/|)| is |true|, where /AT/ is the type
      annotation of the candidate node and /ET/ is the schema type
      declared for element ElementName
      <http://www.w3.org/TR/xpath20/#doc-xpath-ElementName> in the
      in-scope element declarations
      <http://www.w3.org/TR/xpath20/#dt-is-elems>.

   3.

      If the element declaration for ElementName
      <http://www.w3.org/TR/xpath20/#doc-xpath-ElementName> in the
      in-scope element declarations
      <http://www.w3.org/TR/xpath20/#dt-is-elems> is not |nillable|,
      then the |nilled| property of the candidate node is |false|

Is #2 really necessary here? It's about type _annotations_ all right, 
but as I understand it these must be consistent with the XML schema 
types in this respect anyway...

I'm probably just overlooking something, just puzzled...

Soren


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