On Tue, 30 Jan 2001, Robin Berjon wrote:
> At 13:54 30/01/2001 +0000, Matt Sergeant wrote:
> >On Tue, 30 Jan 2001, [EMAIL PROTECTED] wrote:
> >> Seriously - it should be possible to create a XSLT stylesheet that
> will
> >> output plain-text, then use XML::Sablotron or one of the other
> >processors
> >> to generate the text from the XML.
> >
> >Sadly thats not the case. XSLT is not well suited to the task of
> >outputting text documents. It has no facilities for doing things like page
> >widths, indenting, bullet points, etc, for plain text. I have tried this,
> >with the source of the digests being in XHTML, but its harder than it
> >first sounds. You really need to convert to a text format that does have
> >all of these features, such as *roff...
>
> That's true, when XSLT outputs texts, what it's really doing is outputting
> a tree from which all non text nodes have disappeared. That can't give you
> much formatting unless you are very careful with your <xsl:text>. But then,
> filtering that through Text::Autoformat should yield something sensible,
> and probably good.
Unfortunately my version of autoformat (just installed fresh from CPAN)
doesn't seem to do a thing with the output I can produce (which is fairly
close, but damned ugly in places, so I don't know what I'm doing wrong
with it. I was just using: xpathscript style.xps <filename.xml> | perl
-MText::Autoformat -e autoformat (the docs say this should work, but it
doesn't reformat anything).
--
<Matt/>
/|| ** Director and CTO **
//|| ** AxKit.com Ltd ** ** XML Application Serving **
// || ** http://axkit.org ** ** XSLT, XPathScript, XSP **
// \\| // ** Personal Web Site: http://sergeant.org/ **
\\//
//\\
// \\