W3C home > Mailing lists > Public > xmlschema-dev@w3.org > October 2003

key & keyref problem (invalid XPath)

From: Robert Koberg <rob@koberg.com>
Date: Tue, 28 Oct 2003 10:01:35 -0800
Message-Id: <C523055A-0970-11D8-ACA7-00039354A8EC@koberg.com>
To: xmlschema-dev@w3.org


I have several modular, included schemas that I xs:include in a 
'master' config schema so I can check constraints (key/keyref) across 
several configuration XML instances. Instead of using .//constr_elem, i 
want to start with the root node of the instance to better performance, 

I am getting an error in both the Oxygen Xml editor and XMLSpy, but not 
in XSV from the command line. The helpful error message from Oxygen 
c-general-xpath: The expression 'lsb:xsl//lsb:primary | 
lsb:xsl//lsb:dynamic_primary' is not valid w
ith respect to the XPath subset supported by XML Schema.

Using .//constr_elem does not give an error. Is this a bug in the 
editors (I hope so) or XSV? If in the editors, and there is an Oxygen 
developer here, is it possible to fix it? FWIW, I am using Oxygen (just 
downloaded the eval version) in Eclipse on OS X Panther -- it is a 
sweet editor!

The schema looks something like:

   <xs:include schemaLocation="site.xsd"/>
   <xs:include schemaLocation="xsl.xsd"/>
   <xs:element name="config">
         <xs:element ref="lsb:site"/>
         <xs:element ref="lsb:xsl"/>
     <xs:key name="lsb_primary_xsl">
       <xs:selector xpath="lsb:xsl//lsb:primary | 
       <xs:field xpath="@id"/>
     <xs:keyref name="primary_xsl_idrefs" refer="lsb:lsb_primary_xsl">
       <xs:selector xpath="lsb:site//lsb:page | lsb:site//lsb:folder | 
       <xs:field xpath="@lsb:xsl"/>

Received on Tuesday, 28 October 2003 13:01:56 UTC

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