You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Donald Ball <ba...@webslingerZ.com> on 2000/03/16 03:25:42 UTC

Re: Default XSL

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 :
> 
> http://msdn.microsoft.com/xml/samples/defaultss/defaultss.xsl
> 
> 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="http://www.w3.org/1999/XSL/Transform", 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


Re: Default XSL - deja vu all over again!

Posted by Sachin Petkar <sa...@metaphasetech.com>.

Looks like Microsoft have used the power of XML/SGML to define
their own "open" XSL; something which developers could easily
get locked into.  Is this deja vu ?!

Sachin


Donald Ball wrote:
> 
> 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 :
> >
> > http://msdn.microsoft.com/xml/samples/defaultss/defaultss.xsl
> >
> > 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="http://www.w3.org/1999/XSL/Transform", 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
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org

-- 
-----------------------------
Sachin Petkar                        Email:
sachin.petkar@metaphasetech.com
Metaphase Technology Division/SDRC   Phone: (513) 576-7140
2000 Eastman Drive                   Fax  : (513) 576-7691
Milford OH 45150                     http://www.metaphasetech.com/