cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christoph Hermann <christoph.herm...@guschtel.de>
Subject Re: multiple xpaths
Date Tue, 04 Oct 2005 06:42:34 GMT
Sandor Spruit schrieb:

Hello,

>>> ... select="xalan:evaluate($parameter_xpath)"

>> I was hoping for a reply like this - even though a dynamic stylesheet
>> seemed to be a smart move :) I'll give it a try this afternoon.

> The use of an extension function *would* but much easier - if it worked,
> but it doesn't. The extension function does not seem to be allowed as the
> pattern in <xsl:template match="pattern">. Errors all over the place.
> 
> Was does work is the use of the extension in calls to xsl:apply-templates,
> but that is not what I want. It will help iff you want to apply a
> template to
> one specific XPath. What I need is to copy the entire XML tree using a
> regular xsl:copy, with some extra highlighting tags inserted for the XPath.

An other Idea i came up with yesterday was the use of names for your
template.
So if you do a
<xsl:template match="*">
	<xsl:apply-templates select="xalan:evaluate($parameter_xpath)"
mode="{$parameter_xpath}" />
</...>

and then a
<xsl:template match="*" mode="{$parameter_xpath}" ...>

(untested)
I don't know if this works, maybe substitute the
mode="{$parameter_xpath}" with mode="somestring".

Christoph

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message