Re: XPath data model: identifying element/attribute type

Hi Norm,

> | In Section 3.6 of the latest Data Model WD, it says:
> |
> |   The type of an element information item is represented by an
> |   expanded-QName whose namespace and local name corresponds to the
> |   first applicable item in the following list:
> |
> |   - xs:anyType if the [validity] property is "invalid" or "notKnown", or
> |
> |   - the {target namespace} and {name} properties of the [member type
> |     definition] schema component if that exists, or
> |
> |   - the {target namespace} and {name} properties of the [type
> |     definition] schema component if that exists, or
> |
> |   - the [member type definition namespace] and the [member type
> |     definition name] if [member type definition anonymous] exists and
> |     is false, or
> |
> |   - the [type definition namespace] and the [type definition name]
> |     if [type definition anonymous] exists and is false, or
> |
> |   - it corresponds to xs:anyType.
> |
> | Note that currently the last bullet point cannot be reached from a
> | legal PSVI because every element in a PSVI must have one of the
> | combinations of properties listed. Elements whose type definition is
> | *anonymous* still have a [type definition] property, it's just that
> | the type definition's [name] is ·absent· (the property exists, I
> | think, but it has no value).

I withdraw this statement, since you're correct that in some PSVIs,
namely those where the [type definition name/namespace/anonymous]
properties are provided rather than a [type definition], you would get
to the last bullet point.

However I think that there's still an issue here about what happens
when the [type definition] is an anonymous type definition and how
that's different.

> That's not my reading of Structures:
>
> In 3.2.5, it says:
>
>   Furthermore, the item has one of the following alternative sets of
>   properties:
>
>   Either
>
>     PSVI Contributions for attribute information items
>
>     [type definition]
>     [member type definition]
>
>   or
>
>     PSVI Contributions for attribute information items
>
>     [type definition type]
>     [type definition namespace]
>     [type definition anonymous]
>     [type definition name]
>
> it appears to me that an anonymous definition never has a [type
> definition] and vice versa.

You mean that you think that if an attribute's type is anonymous then
it will have [type definition type], [type definition namespace],
[type definition anonymous] and [type definition name] properties? My
understanding is that the alternatives are offered as alternatives to
the schema processor. Just under the definition you quote, it says:

  The first (·item isomorphic·) alternative above is provided for
  applications such as query processors which need access to the full
  range of details about an item's ·assessment·, for example the type
  hierarchy; the second, for lighter-weight processors for whom
  representing the significant parts of the type hierarchy as
  information items might be a significant burden.

I don't think that we can guarantee which kind of processor will be
used to provide the PSVI.

I think that we should amend the bullet points to read:

  - xs:anyType if the [validity] property is "invalid" or "notKnown", or

  - the {target namespace} and {name} properties of the [member type
    definition] schema component if that exists and its {name}
    property is not absent, or

  - the {target namespace} and {name} properties of the [type
    definition] schema component if that exists and its {name}
    property is not absent, or

  - the [member type definition namespace] and the [member type
    definition name] if [member type definition anonymous] exists and
    is false, or

  - the [type definition namespace] and the [type definition name]
    if [type definition anonymous] exists and is false, or

  - it corresponds to xs:anyType.
  
Cheers,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/

Received on Thursday, 24 October 2002 11:18:33 UTC