On Fri, Oct 06, 2000 at 05:42:34PM +0200, Pavel Hlavnicka wrote:
> Problem is, that the 'select' attribute of xsl:value-if is not 
> interpolated. I'll try to find another way.

OK, in case you're curious, this seems to work rather nicely:

        <xsl:template match="structure/tag">
                <xsl:variable name="name" select="@name"/>
                <newtag>
                <xsl:attribute name="name">
                        <xsl:value-of select="$name"/>
                </xsl:attribute>
                <xsl:for-each select="/page/result/*">
                        <xsl:if test="$name=name()">
                                <xsl:attribute name="value">
                                        <xsl:value-of select="."/>
                                </xsl:attribute>
                        </xsl:if>
                </xsl:for-each>
                </newtag>
        </xsl:template>

Obviously not very efficient (the content of /page/result/* is
scanned lineary) but the result is what I wanted it to be.

Yours,

-- 
------------------------------------------------------------------------
 Honza Pazdziora | [EMAIL PROTECTED] | http://www.fi.muni.cz/~adelton/
 .project: Perl, mod_perl, DBI, Oracle, auth. WWW servers, XML/XSL, ...
------------------------------------------------------------------------

Reply via email to