[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Dividing a list of nodes into parts of the alphabe

Subject: RE: Dividing a list of nodes into parts of the alphabet
From: "Andrew Welch" <ajwelch@xxxxxxxxxxxxxxx>
Date: Fri, 3 Dec 2004 08:30:31 -0000
alphabe
> I am working on a shop system for a friend of mine. This
> system shall parse one XML file into several static XHTML
> documents. As you may expect, there are several problems to
> manage. XHTML documents have to be created for each product,
> for each category and so on. Creating a page for each product
> in its categories directory - e.g.
> /catalogue/CDs/product_120.html - is easy using
> xsl:result-document since I make use of the latest version of
> Saxon and XSLT 2.0.
>
> But with the categories I ran into several logistic yet
> highly interesting problems:
> As you may imagine, the shop might have lots more
> CDs than, for example, Textiles, so I would like to add an
> opportunity to split the page created for each <group> into
> one or more pages, each including all artists beginning with
> the same letter or one letter out of a range of letters.
[snip]
> I think this is kind of tricky as I want to make the
> splitting option as variable as possibly. What I don't know
> is if I need a new attribute or child in <group/> with
> comma-separated letters/letter-groups and how I may interpret
> these. Or is it possible to interpret letters or
> letter-groups as xsl:sequence's in order to iterate through them?

Everything you have mentioned is perfectly possible - you can limit the
items per page by number or by initial, all configurable through
parameters or a different top-level stylesheet.  It's basic grouping, so
I would search read up on that first.

> I have been thinking about this for two hours now. Perhaps
> some of you do know a solution for it or at least are able to
> help in developing one.

2 hours! :) is that a long time to be thinking about a problem?

cheers
andrew

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.