cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Darren Scott <>
Subject Re: XSL Output
Date Thu, 20 Apr 2000 09:00:54 GMT
Donald Ball wrote:
> > Can I write a formatting class that will solve the problem? If so, I
> > would gladly do that and contribute it to the collective... It'd be nice
> > if you could specify an XSLT output method of '(X)HTML' or something
> > like that(?)
> What's the matter with just using the XML formatter? The fact that you
> want <br /> instead of <br/>? I reckon you could patch the Xerces XML
> formatter to do that instead.

Correctomundo - the fact that I don't want the majority existing
browsers to break when I try to feed XML to them!

Ok, I downloaded the source last night and had a poke around. It seems
the Xerces people have already thought of this, and have built in an
XHTML output method, so all we need is an XHTMLFormatter that will hook
into it.

So that's what I did - it was v. simple case of making a couple of
adjustments to the existing HTMLFormatter class. In my setup, I added a
formatting type of text/xhtml to - this isn't strictly
correct, because XHTML should have a mime-type of text/html - this
causes problems when you specify the type in an XSL PI instead of in the
XML because Cocoon seems to send 'text/xhtml' instead of querying the
formatter for the mime-type which is set to 'text/html'.

I have attached it (along with the classfile for other users
convenience) - perhaps somebody could add it to the CVS tree? Stefano,
any chance of it being added to the project and included in the new
release next week? I am convinced that Cocoon needs to be able to output
backwards compatible XHTML until XML-unaware browsers die out.

I hope somebody finds it useful enough to include it in the project
since it's my first contribution. Not much I know but if it's received
well I might get CVS access and become a regular(ish) developer.


Darren Scott
Production Director

View raw message