XSL Filter Help Needed
- From: richie_hackett@xxxxxxxxxxx
- Date: 2 Sep 2006 13:58:44 -0700
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:style*** 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:style***>
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?
.
- Follow-Ups:
- Re: XSL Filter Help Needed
- From: Martin Honnen
- Re: XSL Filter Help Needed
- Prev by Date: Re: Use XPath functions in selectNodes
- Next by Date: Creating XML file based on schema
- Previous by thread: Re: Use XPath functions in selectNodes
- Next by thread: Re: XSL Filter Help Needed
- Index(es):
Loading