xsl-list
[Top] [All Lists]

Re: [xsl] xsl:for-each with dynamic select

2008-04-15 04:57:00
Martin Honnen schrieb:
Przemek Urbanski wrote:

<xsl:variable name="tmp_var">server1</xsl:variable>
<xsl:for-each select="$tmp_var">

You can use
  <xsl:for-each select="*[local-name() = $tmp_var]">
if tmp_var contains the local name of an element.

Or, to match all elements whose local name contains the
string "Server", write:

    select="*[ contains( local-name(), 'Server' ) ]"

Michael

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>