kraftomatic
12-29-2003, 04:37 PM
Hey All,
I'm working on setting font colors, sizes, etc. within my XSL file. This is what I currently have:
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<xsl:for-each select="team/rider">
<div id="dgrey">Rider:</div> <div id="dgreen"><xsl:value-of select="riderName"/></div><br />
Competition No: <xsl:value-of select="riderNo"/><br />
Hometown: <xsl:value-of select="riderTown"/><br /><br />
<xsl:for-each select="riderBody/paragraph">
<p><xsl:value-of select="self::node()" /></p>
</xsl:for-each>
<br />
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
If you notice, I'm using DIV tags, which references an external style sheet I'm using.
My question is: Is this the best way to do this? I'm coming across minor problems, where the DIV tag automatically inserts a line break after it, which messes up my text formatting. I don't see a better way to do this though.
Any thoughts?
Thanks.
I'm working on setting font colors, sizes, etc. within my XSL file. This is what I currently have:
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<xsl:for-each select="team/rider">
<div id="dgrey">Rider:</div> <div id="dgreen"><xsl:value-of select="riderName"/></div><br />
Competition No: <xsl:value-of select="riderNo"/><br />
Hometown: <xsl:value-of select="riderTown"/><br /><br />
<xsl:for-each select="riderBody/paragraph">
<p><xsl:value-of select="self::node()" /></p>
</xsl:for-each>
<br />
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
If you notice, I'm using DIV tags, which references an external style sheet I'm using.
My question is: Is this the best way to do this? I'm coming across minor problems, where the DIV tag automatically inserts a line break after it, which messes up my text formatting. I don't see a better way to do this though.
Any thoughts?
Thanks.