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

Basic Question about Adding Styles to XSL

Subject: Basic Question about Adding Styles to XSL
From: Michelle Tarby <tarbymm@xxxxxxxxxxx>
Date: Tue, 11 Jul 2006 10:17:31 -0400
style in xsl
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 match="name">
<style type="text/css">
.sidelinks { font-size: 8pt;
color: #AA7700;
text-decoration: none
#mainright {
position: absolute;
left: 300px;
font-weight: bold;
padding: 10px;
<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> </body>

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!


"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

Current Thread


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.
First Name
Last Name
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.