xsl-list
[Top] [All Lists]

RE: how to insert/include the text/data in a separate (butlocal) .css file into an HTML O/P using XSL

2003-10-02 11:05:09
True. At the moment for separation and simplicity I am keeping it a pure
CSS file.

Eventually, I think I will write a CSS.XML and write a stylesheet that
picks it up and converts it.

I guess I will have to manually paste the CSS into the XSL-HTML or use
an extension function for now (maybe MSXML 4 will make this easier).

Any other ideas to import the text from a .css file would be welcome. :)

Thanks,

Abhishek Sanwal
HP - Houston Campus
abhishek(_dot_)sanwal(_at_)hp(_dot_)com

-----Original Message-----
From: Brook Ellingwood [mailto:brook(_at_)mootkat(_dot_)com] 
Sent: Thursday, October 02, 2003 11:39 AM
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: Re: [xsl] how to insert/include the text/data in a separate
(butlocal) .css file into an HTML O/P using XSL

Can't you just store the .css in an XML file?

<?xml version="1.0"?>
<css>
    <style>foo</style>
    <style>bar</style>
</css>

and then add it to the <head> using <xsl:template
match="dacument('css.xml')/css/style">, or does it absolutely have to be
a
standalone .css file that gets included? If so, you could also write a
simple XSL that would generate the .css file, so you'd only have to
maintain
the data in css.xml.

-- Brook

From: "SANWAL, ABHISHEK (HP-Houston)" 
<abhishek(_dot_)sanwal(_at_)hp(_dot_)com>
Reply-To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Date: Thu, 2 Oct 2003 10:52:26 -0500
To: <XSL-List(_at_)lists(_dot_)mulberrytech(_dot_)com>
Subject: [xsl] how to insert/include the text/data in a separate (but
local)
.css file into an HTML O/P using XSL

I am curious as to how I can add the .css material from a separate
.css
file into the HTML <HEAD></HEAD> .

Originally I was adding a <LINK> to an external css.
But I am thinking it would better to embed the CSS stuff into the
<STYLE>
<!--
....X.....
-->
</STYLE>

of the output HTML.

Now in the place of X I would like to simply enter the entire material
from the .CSS file using XSL/XML.

Reason why I need to do this:
1. Independent CSS file that can be independently edited and modified
(inserted into the O/P on the fly)
2. Embedding the CSS stuff instead of linking to an external file will
allow us to e-mail the outputs out to people without having to worry
about multiple files or linking to an external .CSS

I tried and <xsl:include> and <xsl:import> don't work.

I read some stuff about using XML include but I am not really sure how
I
can do this to "GET" external text file.

Better ways of doing this ?
Suggestions please ?

Abhishek Sanwal
HP - Houston Campus
abhishek(_dot_)sanwal(_at_)hp(_dot_)com



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




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


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



<Prev in Thread] Current Thread [Next in Thread>
  • RE: how to insert/include the text/data in a separate (butlocal) .css file into an HTML O/P using XSL, SANWAL, ABHISHEK (HP-Houston) <=