cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eric A. Sirois" <easir...@hotmail.com>
Subject Re: XSL Stylesheets
Date Thu, 08 Mar 2001 22:50:15 GMT
As per the W3C Recommendation 16 November 1999 for XSL Transformations
(XSLT)
Version 1.0.

<snip>

The MIME media types text/xml and application/xml [RFC2376] should be used
for XSLT stylesheets. It is possible that a media type will be registered
specifically for XSLT stylesheets; if and when it is, that media type may
also be used.

<snip>

Example: <?xml-stylesheet type="text/xml" href="#style1"?> OR
<?xml-stylesheet type="text/xml" href="#style1"?>

Right now with Cocoon 1.8.2 only process supports stylesheets have the mime
type set to type="text/xsl". Which is fine as per the statement above, but
it must also support "text/xml" and "application/xml" as per the spec.

This was correct for the Working Draft from April 1999

http://www.w3.org/TR/1999/WD-xslt-19990421


So as you can see some who develops a stylesheet by following the W3C XSLT
spec will get an error when using Cocoon. All major XSLT processors still
support the old working draft.

This line of code is added to the XSLTProcessor.java file the Cocoon also
supports the W3C Recommendation 16 November 1999 for XSL Transformations
(XSLT)
Version 1.0.  At the moment it doesn't. :-(

Thus the code change -----> if ((type != null) && ((type.equals("text/xsl"))
|| (type.equals("text/xml"))  || (type.equals("text/application"))))

Hope that clarifies things a bit for the code change. If you have any other
questions let me know.

Kind regards,

Eric Sirois



----- Original Message -----

From: "Robin Green" <greenrd@hotmail.com>
To: <cocoon-users@xml.apache.org>
Sent: Thursday, March 08, 2001 5:09 PM
Subject: Re: XSL Stylesheets


> "Eric A. Sirois" <easirois@hotmail.com> wrote:
> >It's not in the Formatter in the cocoon.properties, the fix need to be in
> >the XSLTProcesor file.  The cocoon.properties has nothing refering to
> >text/xsl
> >
> >line 198 in the getResource() method in XSLTProcessor does not check for
> >these mime type.
> >if ((type != null) && (type.equals("text/xsl")))
> >
> >should be - if you want old stylesheets to work keep text/xsl.  If not
> >remove text/xsl.  It's not part of the W3C XSLT spec.
> >   if ((type != null) && (type.equals("text/xsl"))  &&
> >(type.equals("text/xml"))  && (type.equals("text/application")))
> >
> >Without this someone has to maintain two different versions of a
> >stylesheet.
> >One for Cocoon and one to follow the spec.
>
> How so? I don't understand. Please give an example. Which spec are you
> referring to?
>
>
>
> _________________________________________________________________________
> Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
>
>
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
>
> To unsubscribe, e-mail: <cocoon-users-unsubscribe@xml.apache.org>
> For additional commands, e-mail: <cocoon-users-help@xml.apache.org>
>
>

---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail: <cocoon-users-help@xml.apache.org>


Mime
View raw message