W3C home > Mailing lists > Public > www-xml-schema-comments@w3.org > April to June 2001

[afo@zurich.ibm.com] Interpreting QName in XPath expression for <field> element

From: Henry S. Thompson <ht@cogsci.ed.ac.uk>
Date: 25 Jun 2001 15:40:41 +0100
To: www-xml-schema-comments@w3.org
Message-ID: <f5blmmgmxli.fsf@cogsci.ed.ac.uk>

attached mail follows:


I would like to have your point of view on the way QName appearing in XPath
expression for a <field>  should be interpreted.
Here is an example extracted from the primer :

<schema targetNamespace="http://www.example.com/Report"

<import namespace="http://www.example.com/IPO"/>

 <element name="purchaseReport">
    <element name="regions" type="r:RegionsType">
     <keyref name="dummy2" refer="r:pNumKey">
      <selector xpath="r:zip/r:part"/>
      <field xpath="@number"/>

    <element name="parts" type="r:PartsType"/>
   <attribute name="period"       type="duration"/>
   <attribute name="periodEnding" type="date"/>


 <complexType name="RegionsType">
   <element name="zip" maxOccurs="unbounded">
      <element name="part" maxOccurs="unbounded">
         <restriction base="anyType">
          <attribute name="number"   type="xipo:SKU"/>
          <attribute name="quantity" type="positiveInteger"/>
     <attribute name="code" type="positiveInteger"/>

In <field xpath="@number"/>, since the default namespace (the namespace
without prefix) is http://www.w3.org/2001/XMLSchema, I think "@number"
refers to the qualified attribute
{http://www.w3.org/2001/XMLSchema}{number}.  However, there is no such
attribute in {http://www.example.com/Report}{zip}/
{http://www.example.com/Report}{part} ("number" attribute defined there is
unqualified). According to me, this example extracted from the primer is
What do you think?


  Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh
          W3C Fellow 1999--2001, part-time member of W3C Team
     2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440
	    Fax: (44) 131 650-4587, e-mail: ht@cogsci.ed.ac.uk
		     URL: http://www.ltg.ed.ac.uk/~ht/
Received on Monday, 25 June 2001 10:40:39 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:49:56 UTC