xsl-list
[Top] [All Lists]

[xsl] isn´t this expression right pls help

2007-06-27 02:44:32
Hello xsl-list,

please excuse this silly question, but I can´t see the right way:

This is my structure where I want to match every <p>-element and where I want to count the characters with whitespace:

<broschure cover="false" toc="false">
<head>...</head>
        <contents>
                <title>...</title>
                <test>
                        <section>
                                <h1>...</h1>
                                <p>match this...</p>
                                <kursinfo>...</kursinfo>
                        </section>
                        <section>
                                <h1>...</h1>
                                <p>and this...</p>
                                <kursinfo>...</kursinfo>
                        </section>
                        <section>
                                <h1>...</h1>
                                <p>and this, too!</p>
                                <kursinfo>...</kursinfo>
                        </section>
                        ...
                </test>
        </contents>
</broschure>


I defined a global variable:

<xsl:variable name="count_p_s" select="string-length(//section/p)" />

My problem is that I just get the value of the first <p>-element and not an addition of the rest.

Thanks for helping me.

Andreas


--~------------------------------------------------------------------
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>