xsl-list
[Top] [All Lists]

Re: [xsl] Finding and comparing a parent attribute for the next result in a for-each loop

2008-08-07 09:37:35
Kate Busch Petersen wrote:

I'm fairly new to XSLT and am having no end of difficulty sorting the data from the following XML:

<resource day="04" live="200707040000" month="07" monthname="July" year="2007">
        <title>Title 1</title>
        <section name="Articles">
            <subsection>section 1</subsection>
        </section>
    </resource>
<resource day="10" live="200701100000" month="01" monthname="January" year="2007"> <title>Competition: Commission energy sector inquiry confirms serious competition problems </title>
        <section name="News releases">
            <subsection>section 1</subsection>
        </section>
        <section name="Articles">
            <subsection>section 1</subsection>
        </section>
    </resource>

and so on, for as many resources as there are.

I have managed to sort the data by section and correspondingly by subsection, but now I am having problems drilling down through the navigation, to display all the years for each section (and subsection).

Ideally it should produce a list of all years, so the user can browse the resources by year. All | 2008 | 2007 | 2006 etc

Can you post the HTML you want to create from that fragment above?

--

        Martin Honnen
        http://JavaScript.FAQTs.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>