Re: [xsl] What is the equivalent for-each of <xsl:copy-of select="$elements"/>

Subject: Re: [xsl] What is the equivalent for-each of <xsl:copy-of select="$elements"/>
From: Martin Honnen <Martin.Honnen@xxxxxx>
Date: Sun, 16 May 2010 17:34:57 +0200
Alex Muir wrote:

The output I get for the following for-each loop is only the text and
no html elements and I'm struggling to figure out why.

     <xsl:for-each select="$tableAsXML//*">
          <xsl:copy>
            <xsl:copy-of select="@*"/>
            <xsl:call-template name="normalizeEntityForHTML">
              <xsl:with-param name="arg" select="text()[1]"/>
            </xsl:call-template>
          </xsl:copy>
      </xsl:for-each>

Well either $tableAsXML//* is empty and the for-each does not output anything at all or $tableAsXML//* is not empty and each element is copied and then the template is called.
It is not possible that the template is called but the xsl:copy is not performed.


Maybe you want
  $tableAsXML/descendant-or-self::*
instead of
  $tableAsXML//*
but I am guessing.



--

	Martin Honnen
	http://msmvps.com/blogs/martin_honnen/

Current Thread