Subject: Re: Copy all nodes
From: "Ranjan K. Baisak" <ranjanbaisak@xxxxxxxxx>
Date: Tue, 14 Jun 2005 23:39:27 -0700 (PDT)
|
I forgot to mention, if any <Entry> element with zero
child, then I dont wan to copy.
<xsl:template match="@*|node()">
<xsl:copy>
<xsl:if test="count(child::Entry)>0">
<xsl:apply-templates select="@*|node()" />
</xsl:if>
</xsl:copy>
</xsl:template>
The above template does not work
-Ranjan
--- "Ranjan K. Baisak" <ranjanbaisak@xxxxxxxxx> wrote:
> Hello,
> I need a xpath expression to copy all nodes
> from
> source.
> e.g. input: <Entry>
> <Session>2004/5</Session>
> <Department>Accounting and Finance</Department>
> </Entry>
>
> output:<Entry>
> <Session>2004/5</Session>
> <Department>Accounting and Finance</Department>
> </Entry>
> Can anybody tell me the xpath expression for the
> same.
>
> regards,
> Ranjan
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam
> protection around
> http://mail.yahoo.com
>
>
__________________________________
Discover Yahoo!
Find restaurants, movies, travel and more fun for the weekend. Check it out!
http://discover.yahoo.com/weekend.html
|