cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Uli Mayring <>
Subject Re: permit quoting
Date Tue, 25 Jul 2000 17:46:49 GMT
On Tue, 25 Jul 2000 wrote:

> Actually I think it's not a question about creation invalid XML
> but passing escape characters!What has the output to do with XML?
> Well, mostly it is HTML but not XML. And I want to affect the
> output by this disabling of output escaping.

Well, I'm not sure what the benefit is of "XML in - Garbage out", but I
think XSLT was meant to transform XML into XML. If you want to output
something differently, then you might want to use a formatter. cocoon does
that to make HTML out of XML.

> BTW: Can someone tell me when the 'right' sollution was posted since
> the online search of the cocoon mailing list is still kind of...
> offline ;-)

I have written such a thing in XSLT. I have an XML document, which lists
various "items", all in all I have about 20 items in it. I designed a
stylesheet that let's the user select, if he wants to see the list in a
one-column layout or in two- or three columns. This is quite useful,
because a one-column layout is good for printing, whereas two and three
columns fit more items into the browser window, depending on how large the
user makes it.

As far as I have understood this is the same problem you have. You don't
know in advance how many items appear and how to group them. Grouping in
my case involved making an HTML table with X columns, depending on the
setting for X that the user selected. Also, each item was a table in
itself with Y rows, the number Y is unknown, too. It can change
dynamically if the user modifies the XML file, where the items are stored.

I did this some time ago and remember that it was a great way to learn
XSLT :-)

Anyway, look in the XSLT tutorial by Miloslav Nic, it has an example of
this technique.


Ulrich Mayring
DENIC eG, Softwareentwicklung

View raw message