I have an XML document which looks like
<folder>
<link author="ME"/ url="something">
<link author="YOU" url="something else"/>
<folder>
<link author="ME"/ url="something">
<folder>
<link author="ME"/ url="something">
<link author="YOU" url="something else"/>
</folder>
</folder>
</folder>
There can be any number of depths of folders and there can be any
number of authors.
What I want to do is parse the XML and return another XML document with
the applicable links and structure
My XSL looks like
<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema" version="1.0">
<xsl:param name="Filter" select="'default value'"/>
<xsl:template match="node() | @* | / | root">
<xsl:copy>
<xsl:apply-templates select="node() | @*" />
</xsl:copy>
</xsl:template>
<xsl:template match='treenode[@Author=$Filter]' />
</xsl:stylesheet>
The idea is generally to be able to return to entire hierachical
structure for each link who have a matching author
The problem is I get an error from the treenode[@... line saying
invalid key pattern. It either has a variable reference or key
function.
Any ideas how I can fix this?