xsl-list
[Top] [All Lists]

RE: [xsl] for-each and value-of (tree menu)

2007-11-28 14:43:58

-- 
Charles Knell
cknell(_at_)onebox(_dot_)com - email

Show us an example of your input XML file.

-----Original Message-----
From:     Lucas Gonçalves Grossi <lggrossi(_at_)uol(_dot_)com(_dot_)br>
Sent:     Wed, 28 Nov 2007 18:28:52 -0200
To:       "xsl-list" <xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com>
Subject:  [xsl] for-each and value-of (tree menu)

Hello everybody,

I'm having a problem in my XSL code. My XSL file get an xml as input and 
derives an html. In the output html I'm trying to do a tree menu, and the <h4> 
html tag is the initializator of the button in menu, i.e. when I click in this 
button, the menu open, like this "+" of xml.
The problem is that, as the h4 is after the for-each, it's appearing just in 
the first value. So, the menu is ok (open) just for the first value. Ex:
goal
   +question1
   +question2
If I click on question 1, open or close his submenu. If i click on question 2, 
should appear his submenu, but it open or close the menu of question 1 too.
Can anybody help me? Thanks a lot.

<xsl:for-each select="gqmroot/goal">
        <h4><xsl:value-of select="@titleGoal"/></h4>
                <ul>
                <li><xsl:for-each select="question">
                        <h4><xsl:value-of select="@titleQuestion"/></h4>
                                <ul>
                                <li><xsl:for-each select="metric">
                                        <h4><xsl:value-of 
select="@titleMetric"/></h4>
                                                <h4>
                                                        <xsl:value-of 
select="unparsed-text(@ChartLink)" disable-output-escaping="yes"/>
                                                </h4>
                                     </xsl:for-each>
                                </li>
                                </ul>
                        </xsl:for-each>
                </li>
                </ul>
</xsl:for-each>


LUCAS

                        


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--




--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>