[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Copy all nodes

Subject: RE: Copy all nodes
From: "Ranjan K. Baisak" <ranjanbaisak@xxxxxxxxx>
Date: Wed, 15 Jun 2005 01:02:26 -0700 (PDT)
xsl copy all nodes
Oh sorry, it is a typo
<xsl:template match="Entry[not(*)]">

regards,
Ranjan

--- Michael Kay <mike@xxxxxxxxxxxx> wrote:

> > 
> > Would it be like
> 
> Not if you want to solve the problem as you
> originally described it. You
> never mentioned an element called "connectivity".
> 
> MK
> 
> 
> > <xsl:template match="/">
> > <xsl:apply-templates/>	
> > </xsl:template>
> > <xsl:template match="@*|node()">
> >     <xsl:apply-templates select="@*|node()" />
> > </xsl:template>
> > <xsl:template match="connectivity[not(*)]">
> >  	<xsl:copy>
> >     	<xsl:apply-templates select="@*|node()" />
> > 	</xsl:copy>
> > </xsl:template>
> > 
> > regards,
> > Ranjan
> > 
> > --- Michael Kay <mike@xxxxxxxxxxxx> wrote:
> > 
> > > Your template is copying a node only if it has
> one
> > > or more children named
> > > Entry.
> > > 
> > > Use a standard identity template and supplement
> it
> > > with the second rule:
> > > 
> > > <xsl:template match="Entry[not(*)]"/>
> > > 
> > > Michael Kay
> > > http://www.saxonica.com/ 
> > > 
> > > > -----Original Message-----
> > > > From: Ranjan K. Baisak
> > > [mailto:ranjanbaisak@xxxxxxxxx] 
> > > > Sent: 15 June 2005 07:39
> > > > To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> > > > Subject: Re:  Copy all nodes 
> > > > 
> > > > 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 
> > > 
> > > 
> > 
> > 
> > 
> > 		
> > __________________________________ 
> > Discover Yahoo! 
> > Have fun online with music videos, cool games, IM
> and more. 
> > Check it out! 
> > http://discover.yahoo.com/online.html
> 
> 



		
__________________________________ 
Discover Yahoo! 
Stay in touch with email, IM, photo sharing and more. Check it out! 
http://discover.yahoo.com/stayintouch.html

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.