Question

146
Views
Ama_deus Member since 2014 5 posts
Amadeus
Posted: June 16, 2017
Last activity: June 16, 2017
Closed

Same namespace gets generated when a XML stream rule calls another xml stream rule within it.

Suppose I create 2 xml stream rules, say A and B . Stream rule A calls stream rule B ( using apply rule as the mapping mode)

Stream rule A

<ns1:table xmlns:ns1="http://www.w3.org/TR/html4/">

<ns1:tr>

<ns1:td>Apples</ns1:td>

<ns1:td>Bananas</ns1:td>

</ns1:tr>

</ns1:table>

Stream rule B

<ns1:table xmlns:ns1="https://www.w3schools.com/furniture">

<ns1:name>African Coffee Table</ns1:name

<ns1:width>80</ns1:width>

<ns1:length>120</ns1:length>

</ns1:table>

And the final xml generated run will look like :

<ns1:table xmlns:ns1="http://www.w3.org/TR/html4/">

<ns1:tr>

<ns1:td>Apples</ns1:td>

<ns1:td>Bananas</ns1:td>

</ns1:tr>

</ns1:table>

<ns1:table xmlns:ns1="https://www.w3schools.com/furniture">

<ns1:name>African Coffee Table</ns1:name

<ns1:width>80</ns1:width>

<ns1:length>120</ns1:length>

</ns1:table>

As you can see the namespace prefix generated is the same for both the XML's ie ns1 even though the actual namespaces are different. Is there any way to change the namespace prefix? I tried changing the namespace where I call the second xml stream but no use.

( In the same xml stream rule if I use different namespaces it works perfectly ie it generates different namespace prefixes)

Data Integration
Moderation Team has archived post
Share this page LinkedIn