cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marco Rolappe" <m_rola...@web.de>
Subject AW: Writing plain text files?
Date Tue, 28 Oct 2003 17:34:53 GMT
hi stephanie,

I think you can user the TextSerializer for this.

quoting from its documentation:

<quote>
 * Text serializer converts XML into plain text.
 * It omits all XML tags and writes only character events to the output.
 * Internally, text serializer uses XML serializer with {@link
OutputKeys#METHOD}
 * set to <code>text</code>.
 *
 * <p>Input document must have at least one element - root element - which
 * should wrap all the text inside it.
</quote>


> -----Ursprüngliche Nachricht-----
> Von: users-return-57453-m_rolappe=web.de@cocoon.apache.org
> [mailto:users-return-57453-m_rolappe=web.de@cocoon.apache.org]Im Auftrag
> von Stephanie Zohner
> Gesendet: Dienstag, 28. Oktober 2003 15:26
> An: users@cocoon.apache.org
> Betreff: Writing plain text files?
>
>
> Hi,
>
> I want to write plain text files with Cocoon, What's the best way to do
> this?
>
> The task sounds simple, but for me, it turned out to be quite tricky.
>
> So far I have tried with the SourceWriteTransformer. However, it still
> requires at least a root tag for its output.
> Another problem ist, that I need line breaks in my output text file and I
> don't know, how to tell the XSLT Processor to do this.
>
> To make myself a bit clearer:
> I would like to turn an XML-fragment like this,
>
> <page>
> <line> bla bla bla bla bla bla </line>
> <line> murmel murmel murmel </line>
> </page>
>
> into:
>
> #-----Beginning of text file--------
>
>  bla bla bla bla bla bla
>  murmel murmel murmel
>
> #-----End of text file---------------
>
> Does anybody have an idea?
>
> Thanks,
>
> Stephanie
>
>
> --
> NEU FÜR ALLE - GMX MediaCenter - für Fotos, Musik, Dateien...
> Fotoalbum, File Sharing, MMS, Multimedia-Gruß, GMX FotoService
>
> Jetzt kostenlos anmelden unter http://www.gmx.net
>
> +++ GMX - die erste Adresse für Mail, Message, More! +++
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message