Re: Inconsistency between Primer and Structures

I sympathise with your plight.  As soon as XPath supports types, it
will be easy to do what you want -- just used a type-based XPath for
your three selectors.

Until then I recommend the following:  Put a fixed attribute
declaration for an attribute called e.g. namespaceName on each of your 
three core types, i.e.

  <attribute name="namespaceName" type="token" use="fixed" value="Sensor"/>
  <attribute name="namespaceName" type="token" use="fixed" value="Location"/>
  <attribute name="namespaceName" type="token" use="fixed" value="Component"/>

This will be inherited by all subtypes, and appear in the infoset for
all instances.  Then your unique's can be

  <xs:unique name="UniqueSensors">
   <xs:selector xpath="//*[@namespaceName='Sensor']"
   <xs:field xpath="@name"/>
 </xs:unique>

etc.

Hope this helps

ht
-- 
  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 Tuesday, 30 January 2001 07:54:31 UTC