[xsl] need further assistance with grouping nodes into groups of 3

Subject: [xsl] need further assistance with grouping nodes into groups of 3
From: Chuck Thomas <thoma134@xxxxxxxxxx>
Date: Fri, 28 Sep 2001 11:01:15 -0500
Hi All,

I am very familiar with basic to intermediate xslt, but this one is a bit
beyond my current knowledge, so any help is appreciated.

The list archive was partially useful for my request, but I am still having
difficulties.

I am working with xml documents structured like:

<images>
	<image>
	<id>mandatory info here</id>
	<title>optional element info may be here</title>
	<description>optional element info may be here</description>
	<thumbimage>
		<thumbpath>http://xxx.xxx.xxx/xxx</thumbpath>
		<thumbformat>MIME info, etc.</thumbformat>
	</thumbimage>	
	</image>

	<image>
	<id>mandatory info here</id>
	<title>optional element info may be here</title>
	<description>optional element info may be here</description>
	<thumbimage>
		<thumbpath>http://xxx.xxx.xxx/xxx</thumbpath>
		<thumbformat>MIME info, etc.</thumbformat>
	</thumbimage>	
	</image>
</images>

The <images> wrapper contain multiple <image> children.

What I'd like to do is:

a) create an HTML table that breaks the <image> children into groups of
three, so that the table is only 3 columns wide, and contains as many rows
as there are groups of three, and

b) display in each table cell:
	1) the value of the record's thumbpath element
	2) the first 25 characters of just one of the following elements, in this
order of precendence (<title>, <description>, or <id>)

The list archive contains some clues on how to break the records into
groups of 3, but I need further clarification, especially when trying to
combine it with these other functional requirements.

Any suggestions would be appreciated greatly.

Sincerely,
Chuck Thomas


	
********************************************************
INTERVIEWER: "Have you made any contributions to culture?"
ELVIS:       "Like income taxes, you mean?" 

  --From THE QUOTABLE KING 
    (Nashville: Cumberland House, 1997)

"Qui me amat, amet et canem meum" (Love me, love my dog)
 - A proverb mentioned by St. Bernard in his SERMO PRIMUS

Charles F. Thomas, Certified Archivist
Digital Projects Coordinator
Elmer L. Andersen Library, Room 6
222 21st Avenue South
Minneapolis, MN 55455
612-625-0028
thoma134@xxxxxxxxxx
********************************************************

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread