[xsl] embedded xslt and inline styles

Subject: [xsl] embedded xslt and inline styles
From: Venkat Raghavan Srinivasan <venkatrs@xxxxxxxxxxxxx>
Date: Wed, 20 Nov 2002 15:47:30 -0800
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


Current Thread