Re: [xsl] centralised alphabetical order for distributed content

Subject: Re: [xsl] centralised alphabetical order for distributed content
From: Kevin Jones <kjones@xxxxxxxxxxx>
Date: Tue, 23 Mar 2004 10:49:32 +0000
On Tuesday 23 March 2004 10:09, james walker wrote:
> Re posting as i am stil stuck.......
> Is it possible to write xslt which will create one key across
> 30 files on a xalan server (not sure what sax streams are)?
>

The simple answer is no. Jarno was suggesting you combine the 
files before XSLT processing but it appears you can't do that 
either. An alternative may be to create a variable holding just 
a copy of the items you want to index and use a key on that. I 
have seen problems on some processors doing this as it is really 
a side effect of allowing nodeset access to a result tree 
fragment which was not covered in the original standard. I would 
test it out first, something like this should help you determine 
if this will work. Although be aware this may not be portable 
between processors.

<xsl:key name="fookey" match="test" use="@id"/>

<xsl:variable name="foo">
	<test id='A'/>
	<test id='B'/>
	<test id='C'/>
</xsl:variable>

<xsl:for-each select="xalan:nodeset($foo)">
	<xsl:copy-of select="key('fookey','B')"/>
</xsl:for-each>

Kev.

>
>
> From: "james walker" <jameswalkerandy@xxxxxxxxxxx>
>
> >Reply-To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> >To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> >Subject: RE: [xsl] centralised alphabetical order for
> > distributed content Date: Mon, 22 Mar 2004 13:44:34 +0000
> >
> >I am performing the translations on a servlet which i cant
> > control unfornately, it is based on a xalan server. Also
> > when i tried to use a union operator to include all 30
> > files, for some reason it broke after 27 files ( i am
> > guessing that has something to do with the server dedicating
> > a limited amount of memory for a translation). Is it
> > possible to write xslt which will create one key across 30
> > files on a xalan server (not sure what sax streams are)?
> >
> >cheers
> >james
> >
> >>From: <Jarno.Elovirta@xxxxxxxxx>
> >>Reply-To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> >>To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx>
> >>Subject: RE:  [xsl] centralised alphabetical order for
> >> distributed content Date: Mon, 22 Mar 2004 15:33:38 +0200
> >>
> >>Hi,
> >>
> >> > However, i can only create a key for one file. Is it
> >> > possible to create one
> >> > key for all 30 files? Or would it be easier to somehow
> >> > gather all info from
> >> > 30 files and then create a key from that?
> >>
> >>Depends on your environment: if you're already calling the
> >> transformation e.g. from your own Java code, shouldn't be
> >> too difficult to gather the SAX streams from multiple
> >> document into one that's fed to the Transformer. Also, if
> >> you combine the documents outside the XSLT process, you
> >> could also generate a link/@key attribute that has already
> >> been converted to lowercase to make sorting easier.
> >>
> >>Cheers,
> >>
> >>Jarno - The Cure: Open
> >>
> >>--+---------------------------------------------------------
> >>--------- XSL-List info and archive: 
> >> http://www.mulberrytech.com/xsl/xsl-list You are subscribed
> >> as: jameswalkerandy@xxxxxxxxxxx
> >>To unsubscribe, go to:
> >>http://lists.mulberrytech.com/unsub.php/xsl-list/jameswalker
> >>andy@xxxxxxxxxxx or e-mail:
> >><mailto:xsl-list-unsubscribe-jameswalkerandy=hotmail.com@lis
> >>ts.mulberrytech.com> --+--
> >
> >_____________________________________________________________
> >____ Stay in touch with absent friends - get MSN Messenger
> > http://www.msn.co.uk/messenger
> >
> >
> >--+----------------------------------------------------------
> >-------- XSL-List info and archive: 
> > http://www.mulberrytech.com/xsl/xsl-list You are subscribed
> > as: jameswalkerandy@xxxxxxxxxxx
> >To unsubscribe, go to:
> >http://lists.mulberrytech.com/unsub.php/xsl-list/jameswalkera
> >ndy@xxxxxxxxxxx or e-mail:
> ><mailto:xsl-list-unsubscribe-jameswalkerandy=hotmail.com@list
> >s.mulberrytech.com> --+--
>
> ______________________________________________________________
>___ Express yourself with cool new emoticons
> http://www.msn.co.uk/specials/myemo
>
>
> --+-----------------------------------------------------------
>------- XSL-List info and archive: 
> http://www.mulberrytech.com/xsl/xsl-list You are subscribed
> as: kjones@xxxxxxxxxxx
> To unsubscribe, go to:
> http://lists.mulberrytech.com/unsub.php/xsl-list/kjones@sarveg
>a.com or e-mail:
> <mailto:xsl-list-unsubscribe-kjones=sarvega.com@xxxxxxxxxxxxxx
>tech.com> --+--

Current Thread