xsl-list
[Top] [All Lists]

Re: Noob: hmm using nested templates, how do i get the nodes within

2003-09-18 02:03:07


   <xsl:template match="//Row">

Never start a match pattern with // (it does not do anythiung useful)

   <xsl:when test='(aaa="null")'></xsl:when>

The brackets aren't needed there but otherwise OK.
but you don't need an xsl:choose here at all.

  <xsl:choose>
  <!--Here we put nothing if nodevalue=null -->
  <xsl:when test='(NA="null")'></xsl:when>
  <xsl:otherwise><xsl:value-of select="NA"/></xsl:otherwise>
  </xsl:choose>


All of teh above can be replaced by
  <xsl:value-of select=NA[not(.='null']"/>



   <xsl:variable name="cell" select="//Row/[*]"/> <---------------Here's
   where i think i go wrong, how do i select the nodes 

You can never put a [ after a / I can't really guess what you mean
here but perhaps you mean //Row/* but that would searchg the entire
document for all teh Row elements and then make a node set of all their
children, I doubt you want that as teh result would have no connection
to the cell that you are currently processing.


David

________________________________________________________________________
This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list