Hello fellow-xsl-people,
I have a simple question regarding the use of xsl WITH XHTML to which I have
been unable to find the answer, and it is this:
+-------------------------------------------------+
| Can I apply an xsl stylesheet to (x)html |
| on the client-side *USING THE HTML <LINK> TAG*? |
+-------------------------------------------------+
For example: In 'somepage.html' (an xhtml document) I can apply (relatively
trivial) formatting using css via the link tag:
<link rel="stylesheet" type="text/css" href="simpleFormatting.css" />
I wish, however, to apply the full power of xsl (eg: inserting icons next to
headings), but
- *without* having to rename the file to 'somepage.xml'
- *without* using the <?xsl:stylesheet...?> processing instruction
- rather by using the (very neat and conceptually consistent) <link> tag:
<link rel="stylesheet" type="text/xml" href="powerfulFormatting.xsl" />
Moreover, wishing to combine both css and xsl formatting, I would like to
thus format 'somepage.html' through the following header:
<?xml version="1.1"?>
<html>
<head>
<title>XHTML Page with headings: blue (css) with right-aligned
icons
(xsl)</title>
<link rel="stylesheet" type="text/xml"
href="powerfulFormatting.xsl" />
<link rel="stylesheet" type="text/css"
href="simpleFormatting.css" />
</head>
...
In my browser (IE6) this doesn't seem to work. I see there is a question of
mime type (text/xsl vs. text/xml) between different browsers, but neither
works for me.
This is such a simple approach: ONE system for linking to css for simple
formatting and xsl for structural-formatting. Why isn't it there?
Thanking you all...
Russell Watson
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list