[ https://issues.apache.org/jira/browse/XMLBEANS-333?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Joseph Conti updated XMLBEANS-333: ---------------------------------- Priority: Minor (was: Major) While this is important to me I don't think it's a "Major" > XPath queries using the "child" and "descendant" axes return the same results > ----------------------------------------------------------------------------- > > Key: XMLBEANS-333 > URL: https://issues.apache.org/jira/browse/XMLBEANS-333 > Project: XMLBeans > Issue Type: Bug > Components: XPath > Affects Versions: Version 2.1 > Environment: WIndows XP, Java > Reporter: Joseph Conti > Priority: Minor > > The following 2 queries Strings return the same set of elements when used in > XmlObject's and XmlCursor's selectPath(String path) method. > "declare namespace > ns1='http://www.gamingstandards.com/s2s/schemas/v1.2.6/' > .//s2s:s2sBody/child::*" > "declare namespace > ns1='http://www.gamingstandards.com/s2s/schemas/v1.2.6/' > .//s2s:s2sBody/descendant::*" > The document the being queried has the form: > <s2s:s2sMessage > xmlns:s2s="http://www.gamingstandards.com/s2s/schemas/v1.2.6/"> > <s2s:s2sHeader s2s:messageId="1181262999443" s2s:fromSystem="FromSystem" > s2s:toSystem="ToSystem" s2s:dateTimeSent="2007-06-07T18:36:39.474-06:00"/> > <s2s:s2sBody> > <s2s:communications s2s:commandId="1181262999568" > s2s:dateTime="2007-06-07T18:36:39.568-06:00" s2s:propertyId="1"> > <s2s:commsOnLine s2s:s2sLocation="Here" s2s:s2sVersion="v1.0"/> > </s2s:communications> > </s2s:s2sBody> > </s2s:s2sMessage> > Both queries return: > <xml-fragment v1:commandId="1181263236694" > v1:dateTime="2007-06-07T18:40:36.694-06:00" v1:propertyId="1" > xmlns:v1="http://www.gamingstandards.com/s2s/schemas/v1.2.6/"> > <v1:commsOnLine v1:s2sLocation="Here" v1:s2sVersion="v1.0"/> > </xml-fragment> > <xml-fragment v1:s2sLocation="Here" v1:s2sVersion="v1.0" > xmlns:v1="http://www.gamingstandards.com/s2s/schemas/v1.2.6/"/> > Which I believe is the correct result for the query that uses "descendants" > that is all descendants (children, grandchildren, etc.) of the Body element > are returned. > But my understanding is that the query using "child" should only return the > immediate child of Body that is: > <xml-fragment v1:commandId="1181263236694" > v1:dateTime="2007-06-07T18:40:36.694-06:00" v1:propertyId="1" > xmlns:v1="http://www.gamingstandards.com/s2s/schemas/v1.2.6/"> > <v1:commsOnLine v1:s2sLocation="Here" v1:s2sVersion="v1.0"/> > </xml-fragment> -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]