[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Does the html <link> tag work with xsl?

Subject: RE: Does the html <link> tag work with xsl?
From: Jarno.Elovirta@xxxxxxxxx
Date: Tue, 26 Aug 2003 14:38:27 +0300
xml link tag
Hi,

> 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*? |
> 	+-------------------------------------------------+

No. Well, of course some browser might support

  <link rel="stylesheet" type="text/xslt+xml" href="foo.xsl"/>

etc. but I don't know of any.
 
> 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'

Tweak the server setting to use a different MIME-type for *.html documents in that directory.

>  - *without* using the <?xsl:stylesheet...?> processing instruction

What's wrong with it? (Other than that is should be "xml-stylesheet", not "xsl:stylesheet").

> 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 

Last I check, MSXML doesn't support XML 1.1.

> a question of
> mime type (text/xsl vs. text/xml) between different browsers, 
> but   neither
> works for me.

Use the

  <?xml-stylesheet type="text/xsl" href="powerfulFormatting.xsl"?>

Cheers,

Jarno - Colony 5: Follow your Heart (Hyperheart) 

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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.