|
Subject: Re: [xsl] Recursive evaluation of elements From: Florent Georges <lists@xxxxxxxxxxxx> Date: Sat, 12 Dec 2009 11:58:45 +0000 (GMT) |
Rowan Sylvester-Bradley wrote:
Hi,
> Item 'c' expands OK, but the value of
the name element in
> item c1 is:
> <name>Item C ({$p1/name}) delivered by
Second Class</name>
> What I need is:
> <name>Item C (A nasty cheap one)
delivered by Second Class</name>
> Can anyone suggest how to do this?
I
didn't look into the details, but it seems you simply want to
expand
expressions recursively: as long as the result of an
expansion contains curly
braces, it should be expanded itself.
So at first glance, I would adapt the
following:
<xsl:matching-substring>
<xsl:value-of select="
saxon:eval(
saxon:expression(regex-group(1)),
$tablerow,
$source
)"/>
</xsl:matching-substring>
into the following (but as I said, I didn't look
into the
details, for instance would you have to adapt params, etc.):
<xsl:matching-substring>
<xsl:variable name="expanded" as="text()">
<xsl:value-of select="
saxon:eval(
saxon:expression(regex-group(1)),
$tablerow,
$source
)"/>
</xsl:variable>
<xsl:apply-templates select="$expanded" mode="#current"/>
</xsl:matching-substring>
Regards,
--
Florent Georges
http://www.fgeorges.org/
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| [xsl] Recursive evaluation of eleme, Rowan Sylvester-Brad | Thread | RE: [xsl] Recursive evaluation of e, Rowan Sylvester-Brad |
| Re: [xsl] Using divide-and-conquer , Andrew Welch | Date | Re: [xsl] Using divide-and-conquer , Dimitre Novatchev |
| Month |