[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

RE: [xsl] include css in xsl


Subject: RE: [xsl] include css in xsl
From: "Passin, Tom" <tpassin@xxxxxxxxxxxx>
Date: Wed, 19 Mar 2003 11:23:52 -0500

[ I have copied this question over to the right thread.  Please respond
to this thread]

It sounds as if you are expecting something to happen that is not going
to happen.  the html code you show below is apparently in an html file
(the output of your transformation, I imagine?).  At this point, when
you load the file into a browser, no xslt transformation is going to be
invoked.  On the other hand, the css stylesheet should be applied to the
page, via the "link" element.

If that is not happening, probably the path to the css file is wrong, or
the css file is not valid css.  Perhaps the external css file contains
xml instead of css (it should not have a "style" element, for example)? 

You have to decide whether your xslt stylesheet is going to insert the
__css text__ from an xml file into your html output document, or whether
it is going to insert a reference to a css file, as you have it below.
You cannot succees with a mix and match approach.

Cheers,

Tom P

> > [ TP]
> > > I wrote this in the head of the xsl
> > > ----------------------------------------------------------------
> > > <head>
> > > <link  rel="stylesheet" href="style.css" type="text/css"/>
> > > </head>
> > > ----------------------------------------------------------------
> > > It did not pick it up..... any ideas.....
> > >
> >
> > What do you mean?  What do you mean by "the head of the xsl"?
> 
> This is the code that apears in "View source"
> 
> <html>
> <head>
> <META http-equiv="Content-Type" content="text/html; charset=UTF-8">
> <title>Test</title>
> <link media="screen" type="text/css" href="../css/style.css"
> rel="stylesheet">
> </head>
> <body>
> etc....
> 
> I dont belive that the xsl is picking up the css file when it 
> renders the
> html.
> 

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



Current Thread
  • RE: [xsl] include css in xsl
    • Passin, Tom - Wed, 19 Mar 2003 10:30:28 -0500
      • <Possible follow-ups>
      • Passin, Tom - Wed, 19 Mar 2003 11:23:52 -0500 <=
        • TP - Wed, 19 Mar 2003 10:55:03 -0600
          • Robert Koberg - Wed, 19 Mar 2003 09:19:12 -0800
          • TP - Thu, 20 Mar 2003 09:13:39 -0600
          • TP - Thu, 20 Mar 2003 09:16:20 -0600
Keywords