cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Dynamic XPath filtering
Date Fri, 02 Jun 2000 18:08:21 GMT
I am trying to use XPath to filter a node-set.  This works great when I know
which attribute I'm filtering on ahead of time.  For example:

<xsl:variable name="data" select="document('page.xml')"/>
<xsl:variable name="filteredData" select="$data//row[@name!='']"/>

However, when I don't know the name of the attribute ahead of time, it gets
upset.  For example:

<xsl:variable name="attr" select="name"></xsl:variable>
<xsl:variable name="filteredData" select="$data//row[@$attr!='']"/>

Does anyone know how to do this?

	- Greg

View raw message