Link to home
Start Free TrialLog in
Avatar of PMH4514
PMH4514

asked on

XSL Transformations

I'm using XSL and XML to render DB content.  My first attached snippet is the XSL, the 2nd is the CSS values..

I'm using this to render a chat/discussion. It basically gives me what I want like below:

My Name
Date
Comments......

            Your Name
            Date
            Comments......

My Name
Date
Comments......

            Your Name
            Date
            Comments......


etc..

My question is, how do I make "My Name" and "Your Name" fields render in bold?

Thanks

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> 
	<xsl:template match="item"> 
		<div class="discussion">
		<div class="{./discussion_class}">
			 <xsl:value-of select="./team_member_name"/><br/><xsl:value-of select="./comment_date"/><br/>
			<xsl:value-of select="./comment"/>
		</div>
		</div>
	</xsl:template> 
</xsl:stylesheet>

Open in new window

.discussion{font-size:12px;font-color:#000000;margin:5px;}
.discussion.my_comment{width:85%;color:#687899;margin:5px;float:left;}
.discussion.others_comment{width:85%;color:#DDDDDD;margin:5px;float:right;}

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of eridanix
eridanix
Flag of Czechia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of PMH4514
PMH4514

ASKER

ahh, simpler than I expected! I was trying to wrap it with <span> and couldn't get it to work..  then I thought the closing </b> had to instead be <b/>...  Figures I wouldn't try the most obvious. Still pretty new to XSL transformations..

thank you
Hi,

this is not about xslt, but about html. In xslt you can use any html tag you want.
Avatar of PMH4514

ASKER

thanks!