Hi All,
I am using a xslt identity transform and I have one more template to
manipulate "EVENTHEADER" header.
I am not sure ,how to do exclude the " xmlns:ns2="uri" attribute in
the output using the preceding-sibling::node() apply template.
<ns2:local xmlns:ns2="uri"><EVENTHEADER>
<xsl:template match="@*|node()">
<xsl:copy>
<xsl:apply-templates select="@*|node()"/>
</xsl:copy>
</xsl:template>
<xsl:template match="EVENTHEADER[EVENT_TYPE]">
<xsl:copy>
<xsl:apply-templates select="EVENT_TYPE[position() <
2]/preceding-sibling::node()" />
< EVENT_TYPES>
<xsl:apply-templates select="EVENT_TYPE[position() < 2]" />
</EVENT_TYPES>
<xsl:apply-templates select="EVENT_TYPE[last()]/following-sibling::node()" />
</xsl:copy>
</xsl:template>
Input:
<ns2:local xmlns:ns2="uri"><EVENTHEADER>
Actual output:
<EVENTHEADER xmlns:ns2="uri">
Expected output:
<EVENTHEADER>
</EVENTHEADER >
Any pointer would be really helpful.
Thanks
Senthil
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--