You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by gr...@Cyveillance.com on 2000/06/02 20:08:21 UTC
Dynamic XPath filtering
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