Skip to Main Content

DevOps, CI/CD and Automation

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to add all namespaces in root node of xquery transformation result?

859404Feb 9 2012 — edited Feb 14 2012
Hi,
I'm using xquery Transformation in oracle service bus to transfrom output. The schema used for output transfromation has elements being imported from several schemas. so that output xml has these long tags with namespaces of repective schemas e.g.
<rr:Get360ViewOfProductResponse xmlns:rr="http://canaldigital.com/schema/product/CPMProductInformation/v2.0/">
<ResponseHeader>
<com:ResponseCode xmlns:com="http://broadcast.telenor.com/tsi/common/commonparameters_v1" >0</com:ResponseCode>
<com:ResponseText xmlns:com="http://broadcast.telenor.com/tsi/common/commonparameters_v1" >0</com:ResponseText>
</ResponseHeader>
</rr:Get360ViewOfProductResponse>

what I want to achieve is that all namespaces come once in the rootNode and all childnodes just use the repective prefixes, so that the xml size doesnt grow too large.Like below.
<rr:Get360ViewOfProductResponse xmlns:com="http://broadcast.telenor.com/tsi/common/commonparameters_v1" xmlns:rr="http://canaldigital.com/schema/product/CPMProductInformation/v2.0/" xmlns:pr="http://broadcast.telenor.com/tsi/common/program_v1">
<ResponseHeader>
<com:ResponseCode>0</com:ResponseCode>
<com:ResponseText>0</com:ResponseText>
</ResponseHeader>
</rr:Get360ViewOfProductResponse>

the difference is that ResponseCode and responseText should only use their prefix, and not complete namespace. How can i acheive this.

Thanks in advance.

Edited by: 856401 on Feb 9, 2012 1:53 AM
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 13 2012
Added on Feb 9 2012
12 comments
3,236 views