Re: [xsl] Calling xsl stylesheet from a css stylesheet file

Subject: Re: [xsl] Calling xsl stylesheet from a css stylesheet file
From: Jon Gorman <jonathan.gorman@xxxxxxxxx>
Date: Thu, 1 Dec 2005 10:04:39 -0600
On 12/1/05, mus47@xxxxxxxx <mus47@xxxxxxxx> wrote:
> Hi,
> I am tryin to call an xsl file from a css file using:
> @import "mystyle.xsl";
> but it didn't work. Is there any way to do that.
> Thanks.

How do you picture this working?  Would the xslt stylesheet be
imported, process whatever html page is calling the css sytlesheet,
then the css stylesheet would apply it?

I think you are confused with some basic principles of how css and
xslt are applied.  CSS typically just gives formatting instructions to
a browser or processor of how a document is to appear.  XSL works by
transforming the document into another.  I have seen those comparing
CSS to XSL by talking about both XSLT and XSL-FO.  The XSL process is
to convert XML into an inbetween format called XSL-FO via an XSLT
stylesheet.  There is then a processor which can take the visual
formatting described in XSL-FO (which shares it's origin with CSS) and
use it to render the document or convert it into another format
(typically a binary one or a complex one like pdf).  Most browsers
will do a transformation on an XML document via a processing
instruction, and apply a CSS stylesheet via a linking mechanism.

Jon Gorman

Current Thread