XPath data model: identifying element/attribute type

Hi,

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). Under the scheme above, such elements
would have type whose namespace was the target namespace of the schema
and whose name was nothing.

BTW, I'm not sure what distinction you're making between [name] and
{name}. As I understand it in the XML Schema spec, {name} is a
property on a schema component while [name] is a property on an
information item in the PSVI. Since you're talking about properties in
the PSVI, I believe you should be using the notation [name] rather
than {name}.

Cheers,

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

Received on Saturday, 17 August 2002 09:08:25 UTC