cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Berin Loritsch <>
Subject Re: Plain text from Cocoon
Date Tue, 06 Feb 2001 17:13:03 GMT
"Peter C. Verhage" wrote:
> << Hi!
> I wan't plain text output from cocoon, but somehow it gives an
> error message unless i include som html-tags. How can i get plain
> text without the tags ? >>
> You probably can't. Because of the simple reason that XSL(T) is ment for
> transforming one XML file to another. So you always have to make a XML tree
> with XSLT, whatever the program that interprets the output does with it is
> up to the program (for example transform it to a PDF or HTML document), but
> you cannot use XSLT to create a plain text file without at least some root
> tag.

That's not necessarily true.  Otherwise XSP and VRML won't work.  The
way it works in Cocoon, is you must have root tags.  Everything can be
translated to text inside the base tags.  The TextSerializer or
similar mechanism in Cocoon 1 will strip out the root tags.


This is plain text.

We can have some more text.

And even some more.

When put through the TextSerializer, will strip the root tags and you get:

"This is plain text.

We can have some more text.

And even some more."

(quotes included to show that it is one string).

View raw message