cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ross Burton" <ross.bur...@mail.com>
Subject Re: XSL Formatters
Date Sun, 02 Apr 2000 21:57:00 GMT
>> The formatter is only responsible for transforming a XML tree into an
output
>> document - it makes the assumption that the tree is in the correct markup
>> already.  The PDF formatter works on a XSL:FO tree, but the HTML
formatter
>> required valid XHTML input.  It's more efficient this way: if you are
>> outputting HTML why bother going through FO first?  It's another
transform
>> stage to slow the system down.
>> Actually, a decent Text Formatter which worked with FO (or maybe another
>> simplier DTD) and outputed indented text could be handy.

> But won't that way u are making the styling independent of any particular
> mark-up language. like XHTML, etc...
> i.e. Just put stylesheet in form of formatting objects. And produce
whatever
> document you want by using appropriate formatter.

I presume you are proposing this:

"raw" xml --xslt--> xsl:fo  --formatter--> output format (HTML, PDF, plain
text)

That is possible now in Cocoon 1.x (though it is hacky) in trivial in Cocoon
2:

"raw" xml --xslt--> xsl:fo  --xslt--> output format --formatter--> final
output

Where the output formatter is decided by whatever means you want, the path
of the request, the browser type, the file extension.

If the formatters knew FO they would be very complex, and (often) need to
use XSLT.  This is silly, which is why most formatters are only responsible
for the output format, not the content (there are exceptions here).

Ross


Mime
View raw message