Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-13795

TokenXMLExpressionIterator with inheritNamespaceToken creates duplicate default namespace definition

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.21.5, 2.23.3, 2.22.5, 2.24.1, 3.0.0.M4
    • Fix Version/s: 2.23.4, 2.24.2, 3.0.0.RC1, 3.0.0, 2.25.0
    • Component/s: came-core
    • Labels:
      None
    • Estimated Complexity:
      Unknown

      Description

       If a sub-item also contains the default namespace definition the splitter will duplicate it.

       

      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");
      

       

       

      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>"
      
      output[1]
      <order xmlns="http:acme.com" id="1" xmlns="http:acme.com">Camel in Action</order>
      
      expected[1]
       <order xmlns="http:acme.com" id="1">Camel in Action</order>
      

        Attachments

          Activity

            People

            • Assignee:
              davsclaus Claus Ibsen
              Reporter:
              Pieczewski Christian Pieczewski
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 1h 40m
                1h 40m