[xslt] problem with apply-templates



I have seem to run in to a possible problem with
apply-templates...if you change the document in which
you are working, by doing something like this

<xsl:for-each select="common:node-set($mynodeset)">
  <xsl:apply-templates select="current()">
    <xsl:with-param name="foo">bar</xsl:with-param>
  </xsl:apply-templates>
</xsl:for-each>

<xsl:template match="mynode">
  <xsl:param name="foo"/>
  <xsl:value-of select="$foo"/>
</xsl:template>

...then, the value of $foo is empty...if you had not
changed the document using the node-set function, it
would have the value of 'bar'.  This strikes me as
being a problem...regardless of the document, the
params should get passed....quite obviously this
didn't work either...for the params (note that I am
getting the match, it is just that the params don't
come with the match)..

<xsl:apply-templates
select="common:node-set($mynodeset)">
  <xsl:with-param name="foo">bar</xsl:with-param>
</xsl:apply-templates>

Dan

__________________________________________________
Do You Yahoo!?
Make a great connection at Yahoo! Personals.
http://personals.yahoo.com



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]