cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From guife...@teleco.upv.es
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">
<text>Hallo?</text>
</question>

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

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

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}"/>   
        </xsl:variable>
       
</xsl:template>

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

How can i figure out the problem?

Any help is apreciated. Thanks.

Mime
View raw message