DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16706>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16706

Invalid XPath Expression s

           Summary: Invalid XPath Expression s
           Product: Xerces2-J
           Version: 2.2.1
          Platform: PC
        OS/Version: Windows NT/2K
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: XML Schema datatypes
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]
                CC: [EMAIL PROTECTED]


The parser accepts invalid XPath expressions for the 'selector' and 'field'
elements.

Consider the following schema code:

<xsd:keyref name="PartNumber" refer="r:pNumKey">
   <xsd:selector id="bad01" xpath="r:zip/r:part/@number"/>
   <xsd:field xpath="@number"/>
</xsd:keyref>

The @ symbol can't appear in the 'xpath' attribute of 'selector'.

The @ symbol also can't appear twice in the 'field' element as indicated in the
schema code below:

<xsd:keyref name="PartNumber" refer="r:NumKey1">
   <xsd:selector xpath="r:zip/r:part"/>
   <xsd:field id="bad01" xpath="@number/@quantity"/>
</xsd:keyref>

The following invalid XPath expressions for the 'selector' element are also go
undetected by the parser:

<xsd:unique name="ZipCode">
   <xsd:selector id="bad02" xpath="r:regions///r:zip"/>
   <xsd:field xpath="@code"/>
</xsd:unique>

<xsd:key name="pNumKey">
   <xsd:selector id="bad03" xpath="r:parts/..."/>
   <xsd:field xpath="@number"/>
</xsd:key>

<xsd:keyref name="PartNumber" refer="r:pNumKey">
   <xsd:selector id="bad01" xpath="r:zip/child::**"/>
   <xsd:field xpath="@number"/>
</xsd:keyref>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to