You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ode.apache.org by "Rafal Rusin (JIRA)" <ji...@apache.org> on 2010/07/12 17:06:54 UTC

[jira] Commented: (ODE-663) DOMUtils.cloneNode results in invalid namespace declaration

    [ https://issues.apache.org/jira/browse/ODE-663?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12887395#action_12887395 ] 

Rafal Rusin commented on ODE-663:
---------------------------------

Mark, could you provide BPEL test case, where it fails? 

I tried to do test case like this:
       <bpws:assign name="assign1">
            <bpws:copy>
                <bpws:from expressionLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xquery1.0">
<![CDATA[
<hello:HelloResponse xmlns:hello="urn:/HelloWorld2.wsdl">
<ns1:parent xmlns:ns1="abc">
   <ns1:child xmlns="def">
      <ns2:nestedChild xmlns:ns2="def"/>
   </ns1:child>
</ns1:parent>
</hello:HelloResponse>
]]>
                </bpws:from>
                <bpws:to><![CDATA[$response.body]]></bpws:to>
            </bpws:copy>
        </bpws:assign>


But this works properly and returns:
<?xml version="1.0" encoding="UTF-8"?>
<HelloResponse xmlns="urn:/HelloWorld2.wsdl"><ns1:parent xmlns:ns1="abc"><ns1:child><ns2:nestedChild xmlns:ns2="def"/></ns1:child></ns1:parent></HelloResponse>

I put this example here:
http://github.com/rafalrusin/ode/tree/trunk-ode-663

You can try it by 
buildr _1.3.5_ clean test:XQueryJbiTest
result is in jbi/target/test/test.log

Regards

> DOMUtils.cloneNode results in invalid namespace declaration
> -----------------------------------------------------------
>
>                 Key: ODE-663
>                 URL: https://issues.apache.org/jira/browse/ODE-663
>             Project: ODE
>          Issue Type: Bug
>          Components: BPEL Runtime
>    Affects Versions: 1.3.3, 1.3.4
>            Reporter: Mark Ford
>            Assignee: Rafal Rusin
>            Priority: Critical
>             Fix For: 1.3.5
>
>         Attachments: ode1.x-663-v1.txt, ode1.x-663-v2.txt, ode1.x-663-v3.txt, ode1.x-663-v4.txt, ode1.x-663-v5.txt
>
>
> The DOMUtils.cloneNode code doesn't handle default namespace declarations correctly when processing an XQuery result from Saxon.
> For example:
> <ns1:parent xmlns:ns1="abc">
>    <ns1:child xmlns="def">
>       <ns2:nestedChild xmlns:ns2="def"/>
>    </ns1:child>
> </ns1:parent>
> results in:
> <ns1:parent xmlns:ns1="abc">
>    <ns1:child xmlns:xmlns="def">
>       <ns2:nestedChild xmlns:ns2="def"/>
>    </ns1:child>
> </ns1:parent>
> Notice that the default namespace has been rewritten as xmlns:xmlns which is invalid. 
> Granted the above example is a bit odd, but strange things can happen when passing nodes in and out of XSLT and XQuery with respect to namespace declarations.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.