This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: apply-templates Q



<xsl:template match="Dates/Weeks">
	<xsl:apply-templates/>
</xsl:template>

<xsl:template match="Week">
	<xsl:value-of select="."/>
</xsl:template>

<xsl:template match="Weeks/Date"/>

Is one way. Depends what you need to do.

all the best
Lee

 -----Original Message-----
 From: mxmodi@duke-energy.com [mailto:mxmodi@duke-energy.com]
 Sent: 31 October 2000 12:45
 To: xsl-list@mulberrytech.com
 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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]