[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
RE: apply-templates Q
Subject: RE: apply-templates Q From: sara.mitchell@xxxxxxxxx Date: Wed, 1 Nov 2000 09:58:53 -0400 (EST) |
Well, if the path is always data/Dates/Date it is MUCH faster to simply select that rather than using the '//' syntax: <xsl:apply-templates select="data/Dates/Date"/> But if Dates/Date can occur at several levels, you can still get only the Date inside Dates (and not inside Weeks) using this: <xsl:apply-templates select="//Dates/Date"/> Sara > -----Original Message----- > From: mxmodi@xxxxxxxxxxxxxxx [mailto:mxmodi@xxxxxxxxxxxxxxx] > Sent: Tuesday, October 31, 2000 4:45 AM > To: xsl-list@xxxxxxxxxxxxxxxx > Subject: xsl:apply-templates Q > > > Hi, > > I have a very simple Q on xsl:apply-templates. I have gone > through the FAQ > but could not find it and probably its just how I am looking > it up. Anyway, > here is the problem. > > My XML is as follows: > > <data> > <Dates> > <Date> > <Weeks> > <Week>some value...</Week> > <Date>some value...</Date> > </Weeks> > </Date> > </Dates> > </data> > > My XSL snippet is: > > <xsl:template match="/"> > > some testing...and tables... > > <xsl:apply-templates select="//Date" /> > </xsl:template> > > I want the <xsl:apply-templates> to only select the main > <Date> element and > not the <Date> element within the <Weeks> node. > Unfortunately I have no > control over the XML file. Any help is appreciated. > > Maulik > > > > > XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list > XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: apply-templates Q, Clapham, Paul | Thread | RE: apply-templates Q, Kay Michael |
New MSXML 3.0 is available on the X, David Schach | Date | RE: apply-templates Q, Kay Michael |
Month |