You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Sean Champ <s-...@postoffice.pacbell.net> on 2000/04/19 01:21:53 UTC
HTML-tidy, JTidy.HTML (was Re: unformatted XSLT output)
hello.
tom stuart wrote:
> Maybe I'm missing the point, but I'd like to generate clean, controlled
> HTML (or XHTML, preferably) from XML content,
> I'm trying to turn tidy XHTML out of my XSL, which works fine with Xalan -
> when I don't use one of the formatter switches. In Cocoon, though, the
> default (HTML) formatter insists on stripping newlines, turning <br />
> into <br>, and so on.
1) I don't think you're missing any points, there, and I'm glad to know
to be aware of those problems, whenever I finally get some transforms
done here.
("author-side parsing" = the result document needs to be legible, on
the server-side)
2) "HTML-tidy" might be worth-a-download
(it has some sort of an "asXML" option, for tidyOf.XHTML
and can reformat HTML to XHTML. )
http://www.w3.org/People/Raggett/tidy/
or, for a Java version:
http://www3.sympatico.ca/ac.quick/jtidy.html
(which also comes with a JavaBean of it, apparently.
[as if I know what a "JavaBean" is, yet].
and has DOM support, though it doesn't say "level 1" or "level 2")
<sidebar>
(it looks like the non-java version of HTML-tidy might benefit from a
slightly modified algorithm on the line-wrappings
(eg, it has a tendency to split :
attribute="attValue"
: after the equals-sign, which doesn't look good.)
...but maybe this can be fixed with relative ease, on the java
version, if it is also an issue there.)
</sidebar>
==> might JTidy deserve a spot in the CVS-tree?
tom stuart wrote:
>
> Hi,
>
> Is it possible to get Cocoon to return plain, unformatted, XSL transformed
> output; namely, the same as what I'd get with:
>
> java org.apache.xalan.xslt.Process -in content.xml -xsl style.xsl
>
> Maybe I'm missing the point, but I'd like to generate clean, controlled
> HTML (or XHTML, preferably) from XML content, and I can't seem to get it
> out of the XSLT process without it getting somehow munged by a formatter.
> Are the formatters mandatory? Do they represent a key component in the
> concept of Cocoon?
>
> I'm trying to turn tidy XHTML out of my XSL, which works fine with Xalan -
> when I don't use one of the formatter switches. In Cocoon, though, the
> default (HTML) formatter insists on stripping newlines, turning <br />
> into <br>, and so on. Makes sense, but I don't want that this time. Using
> <?cocoon-format type="text/xml"?> doesn't seem to have any effect at *all*
> on the output - but maybe I'm having a cacheing problem.
>
> Is there an XHTML formatter? Is there a dummy formatter, so that I can get
> straight, fresh-from-Xalan content out of Cocoon?
>
> Am I, heh, just missing the point here? I have my suspicions.
>
> Cheers,
> -Tom
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org