Jump to content

Can anybody tell me how to link an xslt file to a css


paulfrancis99
 Share

Recommended Posts

Here is my code I have linked it to a CSS file at the top and want it to change the formatting in the table i.e. change the text or color. But none of the CSS is working and I don't know whats wrong with it. The file works so it must be OK but just no changes are happening. Am I linking the CSS wrong? If so how do I do it? HELP ME!!!!!!!!! I swear I'll love ya<?xml version="1.0" encoding="UTF-8" ?><xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"><xsl:template match="/"><html><head> <title>The Dating Database</title> <style type="text/css"> .cname {font-family:Impact;font-size:14pt;font-weight:bold} .about {font-family:Tahoma;font-size:10pt} .interests {font-family:Tahoma;font-size:34pt;font-weight:bold;color:gray;} .introduction { position:absolute; right: 0.5 em; } </style></head><body> <xsl:apply-templates select="/dating_agency/client"> <xsl:sort select="name"/> </xsl:apply-templates></body></html></xsl:template> <xsl:template match="client"> <xsl:variable name="T" select="concat(//interest[1],' - ',//interest[2],' - ',//interest[3])"/> <table border="1" cellpadding="10" bgcolor="#cc3333"> <tr> <td><img src="images/{name}.gif" alt="images/{name}" border="1"/></td> <td> <div class="cname"><xsl:value-of select="name"/></div><p/> <div class="about"> <xsl:value-of select="ethnicity"/> <xsl:value-of select="gender"/> seeking <xsl:value-of select="seeking"/></div><p/> <div class="interests">Interests</div><xsl:value-of select="$T"/> <div class="membership_status">Membership Status</div><xsl:value-of select="membership_status"/><p/> </td> <td> <div class="introduction">About me</div><xsl:value-of select="introduction"/><p/> <xsl:value-of select="ideal_date"/> </td> </tr> </table></xsl:template></xsl:stylesheet>

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...