cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Donald Ball <>
Subject Re: Default XSL
Date Thu, 16 Mar 2000 02:25:42 GMT
On Wed, 15 Mar 2000, Bob wrote:

> Folks :
> If you try to open up an xml document in Microsoft Internet Explorer,
> and if you dont have an associated XSL, it still opens the document with
> a default style sheet, which is pretty handy in the sense that it
> provides some good capabilities like color coding of markup,
> auto-indenting of the display and the best part, click and
> expand/collapse. The good thing is it can operate on any XML document.
> That internal style sheet has been made public by microsoft and is
> available at :
> This style sheet generates DHTML from the XML document.
> I am trying to use this style sheet with Cocoon and am unable to do so.
> I have tried specifying this style sheet for an XML document and it
> doesnt work. Is there anybody who has tried doing this? or is a generic
> style sheet available somewhere on the net which can be used with
> Cocoon, and can provide similar capability? This would be real help as
> most of our users have variety of XML documents with no XSL, and a
> click/expand heirarchy display in the browser would be great help.

The xmlns:xsl pseudoattribute is incorrect; it should be
xmlns:xsl="", plus the xsl:stylesheet
element needs a version="1.0" attribute. Actually, there are quite a few
things wrong with their stylesheet; they're using <xsl:if match="...">
instead of <xsl:if test="...">, for instance. If you run your xml + this
xsl from xalan on the command line:

java org.apache.xalan.xslt.Process -in foo.xml -xsl foo.xsl

you should get descriptive errors which you can then patch.

The view-source.xml XSP example that comes with cocoon does some fairly
nice highlighting with colors and such. Might be worth your while to check
it out.

- donald

View raw message