You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Christian Pieczewski (JIRA)" <ji...@apache.org> on 2019/07/26 14:43:00 UTC

[jira] [Updated] (CAMEL-13795) TokenXMLExpressionIterator with inheritNamespaceToken creates duplicate default namespace definition

     [ https://issues.apache.org/jira/browse/CAMEL-13795?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Christian Pieczewski updated CAMEL-13795:
-----------------------------------------
    Description: 
 If a sub-item also contains the default namespace definition the splitter will duplicate it.

 
{code:java|title=route definition}
from("file:target/pair?initialDelay=0&delay=10")
                    // split the order child tags, and inherit namespaces from the orders root tag
                    .split().tokenizeXML("order", "orders")
                        .to("mock:split");
{code}
 

 
{code:xml|title=input}
<orders xmlns="http:acme.com"> 
 <order xmlns="http:acme.com" id="1">Camel in Action</order>
 <order id="2">ActiveMQ in Action</order>
 <order id="3">DSL in Action</order>
</orders>"
{code}
{code:xml|title=output[1]}
<order xmlns="http:acme.com" id="1" xmlns="http:acme.com">Camel in Action</order>
{code}
{code:xml|title=expected[1]}
 <order xmlns="http:acme.com" id="1">Camel in Action</order>
{code}

  was:
 If a sub-item also contains the default namespace definition the splitter will duplicate it.
{code:xml|title=input}
<orders xmlns="http:acme.com"> 
 <order xmlns="http:acme.com" id="1">Camel in Action</order>
 <order id="2">ActiveMQ in Action</order>
 <order id="3">DSL in Action</order>
</orders>"
{code}
{code:xml|title=output[1]}
<order xmlns="http:acme.com" id="1" xmlns="http:acme.com">Camel in Action</order>
{code}
{code:xml|title=expected[1]}
 <order xmlns="http:acme.com" id="1">Camel in Action</order>
{code}


> TokenXMLExpressionIterator with inheritNamespaceToken creates duplicate default namespace definition
> ----------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-13795
>                 URL: https://issues.apache.org/jira/browse/CAMEL-13795
>             Project: Camel
>          Issue Type: Bug
>          Components: came-core
>    Affects Versions: 2.21.5, 2.23.3, 2.22.5, 2.24.1, 3.0.0.M4
>            Reporter: Christian Pieczewski
>            Priority: Minor
>
>  If a sub-item also contains the default namespace definition the splitter will duplicate it.
>  
> {code:java|title=route definition}
> from("file:target/pair?initialDelay=0&delay=10")
>                     // split the order child tags, and inherit namespaces from the orders root tag
>                     .split().tokenizeXML("order", "orders")
>                         .to("mock:split");
> {code}
>  
>  
> {code:xml|title=input}
> <orders xmlns="http:acme.com"> 
>  <order xmlns="http:acme.com" id="1">Camel in Action</order>
>  <order id="2">ActiveMQ in Action</order>
>  <order id="3">DSL in Action</order>
> </orders>"
> {code}
> {code:xml|title=output[1]}
> <order xmlns="http:acme.com" id="1" xmlns="http:acme.com">Camel in Action</order>
> {code}
> {code:xml|title=expected[1]}
>  <order xmlns="http:acme.com" id="1">Camel in Action</order>
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)