Subject:Selecting the last instances in a nodeset Author:Adam Van den Hoven Date:21 Jan 2002 10:04 PM
Hey,
I know I've done this before but I'm drawing a blank.
In my template I create a variable (using select) that is a nodeset of property nodes from various locations in my document (but not all the property nodes in the doc). My property nodes all have a name attribute. As it turns out, I have multiple properties with the same name. I want a nodeset that is made up of one property of each name and that property is the last one of that name.
I tried using keys (a variation on the Muenchian Method for groupig) but I'm running into walls. Does anyone have any ideas?
My nodeset: val1 val2 val3 val4 val5
I want a nodeset that is: val2 val4 val5
(order is not important)
> -----Original Message-----
> From: stylus-studio-xslt Listmanager [mailto:listmanager]
> Sent: Monday, January 21, 2002 10:14 PM
> To: Recipients of 'stylus-studio-xslt' suppressed
> Subject: Selecting the last instances in a nodeset
>
>
> From: "Adam Van den Hoven"
>
> Hey,
>
> I know I've done this before but I'm drawing a blank.
>
> In my template I create a variable (using select) that is a
> nodeset of property nodes from various locations in my
> document (but not all the property nodes in the doc). My
> property nodes all have a name attribute. As it turns out, I
> have multiple properties with the same name. I want a nodeset
> that is made up of one property of each name and that
> property is the last one of that name.
>
> I tried using keys (a variation on the Muenchian Method for
> groupig) but I'm running into walls. Does anyone have any ideas?
>
> My nodeset:
> val1
> val2
> val3
> val4
> val5
>
> I want a nodeset that is:
> val2
> val4
> val5
> (order is not important)
>
> Any ideas?
>
> Adam
>
>
>
> To reply: mailto:stylus-studio-xslt.4466@edn.exceloncorp.com
> To start a new topic: mailto:stylus-studio-xslt@edn.exceloncorp.com
> To login: http://edn.exceloncorp.com/~SSDN
>
>
> -----Original Message-----
> From: stylus-studio-xslt Listmanager [mailto:listmanager]
> Sent: Tuesday, January 22, 2002 1:24 PM
> To: Recipients of 'stylus-studio-xslt' suppressed
> Subject: RE: Selecting the last instances in a nodeset
>
>
> From: "Adam Van den Hoven"
>
> Ivan,
>
> Unfortunately its not going to work in my situation. My
> nodeset is created by with a select
>
> select="//theme[@id=current()/@themeid]/property | property[@name]"
>
> and so the following siblings axis is meaningless in this
> case since it refers to document not the nodeset.
>
> I ended up using the Muenchian method (with some
> modifications) but now I seem to be having other problems with it.
>
> Any more ideas would be useful.
> Adam
>
>
>
> To reply: mailto:stylus-studio-xslt.4480@edn.exceloncorp.com
> To start a new topic: mailto:stylus-studio-xslt@edn.exceloncorp.com
> To login: http://edn.exceloncorp.com/~SSDN
>
>