cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Derek Hohls" <DHo...@csir.co.za>
Subject Re: Convert text to wml
Date Fri, 06 Aug 2004 13:51:29 GMT
Why not use SLOP to generate the simple XML markup
and then run it through a stylesheet to strip off what you
don't want - really, this is very little work and certainly
much easier than writing your own generator!

(PS I think your use case is so simple that no one has
seen any need to write a specialised generator for it.)

>>> orosmith@sify.com 2004/08/06 02:46:34 PM >>>
Is there any generator which will add just 2 tags, one in the beginning
and another in the end of the text ??



Quoting  DHohls@csir.co.za: 

> Remember that a generator (start of match in a pipeline)
> is expected to produce a "stream" of XML  - if your text
> file has no tags at all you will need to write your own
> generator to add these tags in the right places, see:
>
http://cocoon.apache.org/2.1/developing/extending.html#When+to+write+a+Generator

> 
> (possibly an XSP might be a one way to get
> started with this... - alternatively, if your text has at
> least some structure to it, maybe try the SLOP generator - 
> look in your installation of Cocoon under:
> /samples/blocks/slop/welcome
> 
> Output will require transformation (often the second
> step after the generation phase) into WML format...
> you will probably require a custom stylesheet whose
> code will depend on what you get from your generator
> (see above) - the serializer is *not* responsible for 
> doing the "formatting" - this is the job of the transformation 
> step.  Perhaps you could read up more on the basic 
> Cocoon concepts:
> http://cocoon.apache.org/2.1/userdocs/concepts/index.html 
> or this:
> http://www.javaworld.com/javaworld/jw-09-2002/jw-0920-cocoon.html 
> (both are a little dated, but the basic ideas are there).
> 
> 
> >>> orosmith@sify.com 2004/08/06 09:02:06 AM >>>
> i recieve a file in text format from a certain url.
> 
> The file has no tags at all. 
> How can this text be output in wml format?
> 
> Can xsl be used to read a text file without tags?
> Is using a wml serializer enough to give the output in wml format?
> 
> 
> 
> -- 
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.
> MailScanner thanks transtec Computers for their support.
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org 
> For additional commands, e-mail: users-help@cocoon.apache.org 
> 
> 

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
MailScanner thanks transtec Computers for their support.


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


Mime
View raw message