Geert Josten schrieb:
Hello,
>>> No, this gets worse, actually. You cannot use parameters or expressions
>>> at all in a mode attribute. :-(
>>>
>>> And by replacing the expression by a string, you remove the dynamic
>>> element again.. :-P
>> Why? I mean the "xpath string" is still evaluated for a different xpath.
>> Or do you need every xpath to be processed differently?
>> If then make the difference by looking at your variable (which is
>> static).
> You can use a literal xpath string in a mode attribute, but you will
> have to guess which xpath expressions might occur if you want the XSL to
> be static.
>
> Next to this, you cannot use {..} inside a mode attribute, not at
> xsl:apply-templates, nor at xsl:template.
What i meant was:
<template match="*">
<xsl:apply-templates select="xalan:evaluate($xpath)"
mode="my-xpath-mode"/>
</template>
<template match="*" mode="my-xpath-mode">
<choose>
<!-- Or any other check -->
<when test="contains($xpath,'sth')">
Do sth with nodes when the xpath contains "sth"
</when>
<otherwise>
Do sth else
</otherwise>
</choose>
</template>
> You could use your method in a generated XSL, though, but then are you
> making things more difficult than necessary.. :-P
And the above example would match the xpath expression contained in
$xpath doesn't it? (That was the Goal i thought.)
Christoph
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]