View Single Post
  #8 (permalink)  
Old January 15th, 2009, 06:00 AM
nguna nguna is offline
Authorized User
Points: 95, Level: 1
Points: 95, Level: 1 Points: 95, Level: 1 Points: 95, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2009
Posts: 23
Thanks: 2
Thanked 0 Times in 0 Posts
Default

Thanks Micheal,

The solution works if i have it in a seperate style sheet. But not i the following case

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi
="http://www.w3.org/2001/XMLSchema-instance"
xmlns:soapenv
="http://schemas.xmlsoap.org/soap/envelope/"xmlns:icns="urn:NewBusiness_ATV"xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
<xsl:template match="/">
<soapenv:Envelope>
<xsl:call-template name="buildSoapHeader"/>
</soapenv:Envelope>
</xsl:template>

<xsl:template name="buildSoapHeader">
<soapenv:Header>
<icns:IplusHeader>
<icns:freeFormatText>Sample Text</icns:freeFormatText>
</icns:IplusHeader>
</soapenv:Header>
</xsl:template>


<xsl:template match="@* | text() | comment() | processing-instruction()">
<xsl:copy/>
</xsl:template>


<xsl:template match="*">
<xsl:element name="{name()}" namespace="urn:TEST">
<xsl:copy-of select="document('')/xsl:stylesheet/namespace::*[local-name() = icns']"/>
<xsl:copy-of select="namespace::*[not(local-name() = 'icns')]"/>
<xsl:apply-templates select="@* | node()"/>
</xsl:element>
</xsl:template>
</xsl:stylesheet>
Reply With Quote