xsl-list
[Top] [All Lists]

Re: ordering nodes

2006-01-30 02:51:27
On 1/29/06, bokluk <bokluk(_at_)gmx(_dot_)net> wrote:
LIST.XML:

<section label="ligostart">
        <section uri="erzaehlen.html" label="erzaehlen">
                <section uri="dererzaehltext.html" label="dererzaehltext">
                        <section
uri="dertextalssprachlicheszeichensystemdiscours.html"/>
                </section>
        </section>
</section>

dererzaehltext.XML:


....
<definition title="Der Erzähltext" label="dererzaehltextdef">
                        <LMMLtext>blablabla</LMMLtext>
</definition>
<definition title="Der Erzähltext2" label="dererzaehltext2def">
                        <LMMLtext>blabla</LMMLtext>
</definition>
.....

Other XML's mentioned in LIST.XML have the same structure as above.

I need to extract this definitions out of every file and create one html
with all of them ordered alphabetically.

P.S. I'm using cocoon 2 processor

I'm not familiar with the cocoon 2 processor, but if it's an XSLT 2.0
processor you can use:

<xsl:for-each select="for $x in
collection('pathToXMLDirectory?select=*.xml;recurse=yes;on-error=warn')
                        return $x//defnition">
  <xsl:sort select="youdidntsay"/>

...where pathToXMLDirectory is the path of the directory containing
the XML and youdidntsay is the value to use in the sort :)

Sorry the answer is a bit vague, but the question is a bit vague too.

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