Subject: RE: RE: [xsl] How to do this in xsl From: cknell@xxxxxxxxxx Date: Sun, 27 Mar 2005 09:29:45 -0500 |
<xsl:template match="doc"> <html> <head></head> <body> <xsl:apply-templates /> </body> </html> </xsl:template> -- Charles Knell cknell@xxxxxxxxxx - email
-----Original Message----- From: cknell@xxxxxxxxxx Sent: Sun, 27 Mar 2005 08:57:29 -0500 To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Subject: RE: [xsl] How to do this in xsl
You haven't shown enough of your stylesheet to tell us why it isn't working. You've haven't told us what type of output you are trying to produce, but since you speak of displaying, I'm going to assume that you want HTML output.
<?xml version="1.0" encoding="UTF-8" ?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="html" indent="yes" encoding="UTF-8" />
<xsl:template match="/"> <xsl:apply-templates /> </xsl:template>
<xsl:template match="doc"> <html> <head></head> <body> <xsl:apply-templates /> </body> </html> </xsl:template>
<xsl:template match="opt"> <div> <span><font color="black"><xsl:value-of select="substring-before(.,'|')" /></font></span> <span><font color="red"><xsl:value-of select="substring-before(substring-after(.,'|'),'\')" /></font></span> <span><font color="black"><xsl:value-of select="substring-after(.,'\')" /></font></span> </div> </xsl:template>
</xsl:stylesheet> -- Charles Knell cknell@xxxxxxxxxx - email
-----Original Message----- From: T UmaShankari <umashankari@xxxxxxxxxxxxxxxxxxxx> Sent: Sun, 27 Mar 2005 11:22:55 +0530 (IST) To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Subject: [xsl] How to do this in xsl
I am new to this.. I have a set of statements like this..
<xsl:template match="//opt"> <font color="black"> <xsl:variable name="stringfirst"> <xsl:value-of select="substring-before(//opt,'|')"/> </xsl:variable> <xsl:value-of select="$stringfirst"/> </font> <font color="red"> <xsl:variable name="stringmid"> <xsl:value-of select="substring-after(substring-before(//opt,'\'),'|')" /> </xsl:variable> <xsl:value-of select="$stringmid"/> </font>
<font color="black"> <xsl:variable name="stringlast"> <xsl:value-of select="substring-after(//opt,'\')"/> </xsl:variable> <xsl:value-of select="$stringlast"/> </font>
statement1 option1 statement1 statement1 option1 statement1
Regards, Uma
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] How to do this in xsl, cknell | Thread | [xsl] missing output in XSLT 2.0, Jim_Albright |
RE: [xsl] How to do this in xsl, cknell | Date | [xsl] missing output in XSLT 2.0, Jim_Albright |
Month |