[xsl] Basic Question about Adding Styles to XSL

Subject: [xsl] Basic Question about Adding Styles to XSL
From: Michelle Tarby <tarbymm@xxxxxxxxxxx>
Date: Tue, 11 Jul 2006 10:17:31 -0400
This is my first attempt at this, so I want to make sure there's not a better way to do it. I'm setting up my XSL stylesheet by incorporating my css styles right in it. (If I'm not explaining that well, here's a snip)

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; version="1.0">
<xsl:template match="/">
<xsl:for-each select="//guest">
<xsl:apply-templates select="name"/> </xsl:for-each>
</xsl:template>
<xsl:template match="name">
<html>
<head>
<style type="text/css">
.sidelinks { font-size: 8pt;
color: #AA7700;
text-decoration: none
}
#mainright {
position: absolute;
left: 300px;
top:145px;
width:500px;
font-weight: bold;
line-height:1.25;
padding: 10px;
}
</style>
</head>
<body>
<div id="mainright">
<div class="sidelinks">Name: <xsl:value-of select='.'/><br />
Department: <xsl:apply-templates select="../location"/><br />
Website: <xsl:apply-templates select="../website"/><br />
Email: <xsl:apply-templates select="../email"/><br />
Comment: <xsl:apply-templates select="../comment"/><hr />
</div>
</div> </body>
</html>
</xsl:template>
</xsl:stylesheet>


My question is - is this the best way to do it? Can I add a link to an external style sheet in the XSL?

Thanks in advance!

Michelle

--
"Every worthwhile accomplishment, big or little, has its stages of drudgery and triumph; a beginning, a struggle and a victory."
--Mahatma Gandhi

*****************************
Michelle Tarby
Director of Web Services
Information Technology
Le Moyne College
http://www.lemoyne.edu
tarbymm@xxxxxxxxxxx

Current Thread