Re: [xsl] embedded xslt and inline styles

Subject: Re: [xsl] embedded xslt and inline styles
From: Joerg Heinicke <joerg.heinicke@xxxxxx>
Date: Fri, 22 Nov 2002 07:51:33 +0100
Inline stylesheets don't work in IE (in no browser I think). What you see is only the HTML-like XML contained in the stylesheet. But nothing from the stylesheet is executed.

Furthermore you set version to 2.0, which is not supported by IE. XSLT 2.0 is still in working draft status and for example experimentally implemented in Saxon 7.x.

Joerg

Venkat Raghavan Srinivasan wrote:
Hello All,

I am new to xslt design and development paradigm. I am trying out some
embedded xslt templates with inline styles. I have enclosed the snippet
below. (I know this is not the regular approach as it defeats the purpose of
seperating the content,format and the styles).



<?xml version="1.0" ?>

<!DOCTYPE doc [
<!ELEMENT xsl:stylesheet ANY>
<!ATTLIST xsl:stylesheet id ID #REQUIRED>
]>

<?xml-stylesheet type="text/xsl" href="#style1"?>
<dummy>


<xsl:stylesheet version="2.0" id="style1" xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>

<xsl:template match="xsl:stylesheet">
  <!-- ignore -->
</xsl:template>

<xsl:template match="/">
 <HTML>
 <HEAD>
   <TITLE>SVRaghav's</TITLE>
</HEAD>
 <STYLE>
	<![CDATA[
	.title{
	Font-Family : Arial, Helvetica, Verdana, Geneva, sans-serif;
	Color : #cccc66;
	Font-Size : 10px;
	Font-Style : normal;
	Margin-Left : 10;
	}
	]]>
</STYLE>
   <SCRIPT LANGUAGE="JavaScript">
 	<![CDATA[
 	
 	]]>
 </SCRIPT>
<BODY>
<xsl:apply-templates select="resume1" />
</BODY>
</HTML>
</xsl:template>

<xsl:template match="dummy1">
   <DIV CLASS="title">  <xsl:value-of  select="." /></DIV>
</xsl:template>

<xsl:template match="dummy1">
   <DIV CLASS="title">  <xsl:text> DUMMY2 </xsl:text></DIV>
</xsl:template>
</xsl:stylesheet>


<dummy1>DUMMY1</dummy1>


</dummy>



When you view the xml in the borwser (IE 5.x and above), I see that the
styles are applied to contents between the <xsl:text></xsl:text> tags where
as the styles are not applied to contents between <xsl:value-of /> tags.

Could some one tell me why or what mistake I am making?


thanks, VS

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




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


Current Thread