cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Darren Scott <>
Subject XSL Output
Date Wed, 19 Apr 2000 14:35:43 GMT

I posted this message a week or so ago and didn't get a response, so I
thought I'd repost in case I didn't make any sense because I think it's
an issue that everybody should be concerned about.

It touches on some recent discussion, such as Tom Stuart's posting about
XSLT formatting.

Here's the message:

> My early experiences with XSL (or at least Xalan) show that it is not
> easy to output HTML 4.01 compliant XHTML (ie with spaces before the
> trailing slashes on standalone tags).
> Setting the output to HTML removes all such trailing slashes, and
> setting output to XML remove all such trailing spaces!

So - to expand, I would like to output validating XHTML rather than
HTML. The issue is that a lot of browsers cannot cope with strict XHTML
because they don't understand the trailing forward slashes on standalone
tags (like <br/>) - they treat the slash as though it were part of the

W3C (I'm sure everybody knows this) recommends putting a space character
between the tag name and the slash to overcome this problem. The problem
here is that there doesn't seem to be any way of outputting this type of
backwards compatible tag with Cocoon.

As I mentioned above, the HTML formatter will convert <br /> to <br> and
the XML formatter will convert <br /> to <br/>

I am being stupid?

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(?)


Darren Scott
Production Director

View raw message