[ 
https://issues.apache.org/jira/browse/XMLBEANS-655?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17901006#comment-17901006
 ] 

PJ Fanning commented on XMLBEANS-655:
-------------------------------------

Is there a reason not to use Saxon HE directly or another XQuery specialised 
tool for this instead of using XMLBeans?

> XQuery FLWOR expression does not iterate through all child nodes.
> -----------------------------------------------------------------
>
>                 Key: XMLBEANS-655
>                 URL: https://issues.apache.org/jira/browse/XMLBEANS-655
>             Project: XMLBeans
>          Issue Type: Bug
>          Components: XmlObject
>    Affects Versions: Version 4.0.0, Version 5.2.2
>            Reporter: Piotr Darosz
>            Priority: Major
>         Attachments: xmlbeans-problem-example.zip
>
>
> The following query worked fine when executed with XmlBeans 3.1.0 and 
> Saxon-HE 9.5.
> {{XmlObject.execQuery(...)}}
> {code:java}
> declare namespace soap='http://schemas.xmlsoap.org/soap/envelope/';
> declare namespace testns='http://localhost/test_service/Service1.asmx';
> for $z in //testns:test
> order by $z/testns:test_string
> return <result>{data($z/testns:test_string)}</result> {code}
> Following the upgrade to XmlBeans 5.2.2, there seems to be a regression: the 
> query returns only a single match. Tracked it back to changes introduced in 
> XmlBeans 4.0.0 
> ([https://svn.apache.org/viewvc?view=revision&revision=1877931]), all 
> revisions before that one had returned the expected result
>  
> Given the XML document:
> {code:java}
> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"; 
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
>     <soap:Body>
>         <testns:StrokaResponse 
> xmlns:testns="http://localhost/test_service/Service1.asmx";>
>             <testns:StrokaResult>
>                 <testns:test>
>                     <!--Integer value 1-->
>                     <testns:test_int>123</testns:test_int>
>                     <!--String value 1-->
>                     <testns:test_string>Test String</testns:test_string>
>                 </testns:test>
>                 <testns:test>
>                     <!--Integer value 2-->
>                     <testns:test_int>256</testns:test_int>
>                     <!--String value 2-->
>                     <testns:test_string>New Value</testns:test_string>
>                 </testns:test>
>                 <testns:test>
>                     <!--Integer value 3-->
>                     <testns:test_int>1289</testns:test_int>
>                     <!--String value 3-->
>                     <testns:test_string>Qwerty</testns:test_string>
>                 </testns:test>
>             </testns:StrokaResult>
>         </testns:StrokaResponse>
>     </soap:Body>
> </soap:Envelope> {code}
> Expected result:
> {code:java}
> <result>New Value</result>
> <result>Qwerty</result>
> <result>Test String</result>
> {code}
> Actual result:
> {code:java}
> <result>Test String</result>{code}
>  
> It works fine when run against Saxon-HE 12.5 JAR in the command line.
> Attached a sample Maven project with the exact issue replicated.
> Could you provide guidance how this can be resolved?



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org
For additional commands, e-mail: dev-h...@poi.apache.org

Reply via email to