cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Template problem
Date Wed, 08 Mar 2000 18:34:35 GMT
Hi friends

I have a document which looks more or less like this:

<question id="in1">

I have create using DOM an element called "in1".What i want to do is as

<xsl:template match="text">
       <xsl:variable name="reply">
           <xsl:value-of select="../@id"/>   
        <xsl:variable name="reply1">
             <xsl:value-of select="../$reply"/>   

That is, i want to acces to the value of the element "in1" but not
directly. First getting the name of the element from the attribute "id"
of the element "question" and after use the value of "id" in a patten
for acces to the value of the "in1" element.

I have tried with the code above and whith this:

<xsl:template match="text">
       <xsl:variable name="reply">
           <xsl:value-of select="../{@id}"/>   

but both possibilities are wrong. I am using Cocoon 1.6.1.

How can i figure out the problem?

Any help is apreciated. Thanks.

View raw message