Re: Problem with Muenchian grouping
> I group elements that have an <action> child by name and then for each group I > build an HTML table. Members of the same group usually have the same set of > childnodes, but this is not always the case, and this is a problem, given the > way I build the tables: I get the first member of the group and set the > headers of the table to the names of its children (<th align="center" > bgColor="lightgrey"><xsl:value-of select="name()"/> </th>). When other members > of the group have more children, the values of those latter are put in a new > column without header... > > So, instead of getting the first member of the group, I would like to get the > one with the greatest number of children (to get all the headers, it's not a > problem if some fields are blank in the table). Is this possible? This is possible, but you have a wrong idea about the problem. Even if you use the element with biggest number of children, there might be other elements in the same group that have children, whose name will not be represented in the column header. What you really need is all different names of all children of all elements in a group. This is nested grouping and has a standard solution using the same Muenchian method. Please, give a minimal complete example of a source xml document and many people in this group will be glad to provide the solution. ===== Cheers, Dimitre Novatchev. http://fxsl.sourceforge.net/ -- the home of FXSL XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format