Subject: Re: [xsl] Problem with Muenchian grouping From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx> Date: Fri, 07 Nov 2003 14:05:37 -0500 |
I'm interested in the children of <data> that have an <action> child: I would like to group them by name and perform some processing on them. The problem is I cannot know those names (that is, each element is optional), and the number of elements of each category is undefined. So I don't know how to define the <xsl:key> element that I need. I have tried <xsl:key name="records-by-name" match="/*/*[action]" use="name()"> but that doesn't seem to work.
Nor can I identify the elements appearing first in their "group": my_element_name[generate-id(.) = generate-id(key('records-by-name', name())[1])] because precisely I don't know what to put instead of "my_element_name".
I think there is a problem in the way I want to reach the name (the tag name) of those /*/*[action] nodes. But when I replace 'name()' by 'self::name()' it raises an error (isn't 'self' a correct axis?).
Cheers, Wendell
In fact I have mostly tried to adapt the example given by Dr Jenni Tennison in the "Cocoon, sql and xslt" thread, but in my case, the grouping is done depending on the names of the elements I want to group, not on their children's values.
I hope my question is clear.
Thanks in advance,
Jean
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
====================================================================== Wendell Piez mailto:wapiez@xxxxxxxxxxxxxxxx Mulberry Technologies, Inc. http://www.mulberrytech.com 17 West Jefferson Street Direct Phone: 301/315-9635 Suite 207 Phone: 301/315-9631 Rockville, MD 20850 Fax: 301/315-8285 ---------------------------------------------------------------------- Mulberry Technologies: A Consultancy Specializing in SGML and XML ======================================================================
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Re: Problem with Muenchian gr, Dimitre Novatchev | Thread | Re: [xsl] Problem with Muenchian gr, jean pujol |
[xsl] Re: Problem with Muenchian gr, Dimitre Novatchev | Date | Re: [xsl] Re: Filtering with multip, Dongling Ding |
Month |