Skip to Main Content

Integration

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 namespace prefix to root tag in XSL version 1.1 SOA 11g

975726Jan 28 2015 — edited Feb 26 2020

Hi Experts,

   Can any one post solution for adding namespace prefix to root tag using XSL version 1.1 in SOA 11g?

I have tried the below options and none is working.

1. Removing prefix add in exclude-prefixes in XSL.But still seeing no prefix for root tag.

2. Added the <xsl-element>   tag with namespace.But it is not working

3. Added the below XSL code and it is not working.

  <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  
xmlns:ns0="https://api.ladbrokes.com/v1/sportsbook-couchbase/Temp.xsd">
 
<xsl:output method="xml" indent="yes" omit-xml-declaration="yes"/>

 
<xsl:template match="@* | node()">
  
<xsl:copy>
  
<xsl:apply-templates select="@* | node()"/>
  
</xsl:copy>
 
</xsl:template>

 
<xsl:template match="/*">
  
<xsl:element name="ns0:{local-name()}">
  
<xsl:copy-of select="namespace::*" />
  
<xsl:apply-templates select="@* | node()" />
  
</xsl:element>
 
</xsl:template>
</xsl:stylesheet>

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 25 2015
Added on Jan 28 2015
1 comment
1,153 views