Subject: [xsl] what am I missing? From: Carlton Noles <nolesce@xxxxxxxxx> Date: Fri, 11 May 2001 14:57:57 -0700 (PDT) |
here is the xml= <?xml-stylesheet type="text/xsl" href="addhead.xsl"?> <book> <Contact> <LName>Tidwell</LName> <FName>Robert</FName> <Addy1>3619 16th st. w.</Addy1> <Addy2/> <City>Bradenton</City> <State>Fl</State> <Zip/> <HomePhone>941.744.0083</HomePhone> <WorkPhone/> <Pager/> <Mobile>941.587.4822</Mobile> <Company>Final Edge Development</Company> <email>fedge@xxxxxxxxxxxxxxx</email> </Contact> . . . </book> here is the xsl (patterned after chris's filtering example)= <?xml version='1.0' ?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/xsl/transform"> <xsl:param name="LName" select="''" /> <xsl:template match="*|@*"> <xsl:copy> <xsl:apply-templates select="@* | * | comment() | processing-instruction() | text()"/> </xsl:copy> </xsl:template> <xsl:template match="book"> <html> <title>Address Book</title> <head> <script language="Javascript" src="filter1.js" /> </head> <body bgcolor="white" style="color:navy;font=12pt Verdana"> <img src="/images/nilogo.BMP" /> <HR color="red"/><BR/> <xsl:choose> <xsl:when test="$LName"> <xsl:apply-templates match="Contact" mode="single" /> </xsl:when> <xsl:otherwise> <xsl:apply-templates match="Contact" /> </xsl:otherwise> </xsl:choose> </body> </html> </xsl:template> <xsl:template match="Contact"> <xsl:for-each select="book/Contact" order-by="+ LName"> <strong style="color:Navy;font:16pt Arial"><A style="text-decoration:none;color:navy"> <xsl:attribute name="onclick"> filter(<xsl:value-of select="LName"/>) </xsl:attribute> <xsl:value-of select="LName"/> ,<xsl:value-of select="FName"/></A></strong><BR/> </xsl:for-each> </xsl:template> <xsl:template match="Contact" mode="single"> <strong style="color:Navy;font:16pt Arial"><xsl:value-of select="LName"/> ,<xsl:value-of select="FName"/></strong><BR/> <span style="color:red"><xsl:value-of select="Company"/></span><BR/> <xsl:value-of select="Addy1"/><BR/> <xsl:value-of select="City"/>, <xsl:value-of select="State"/> <xsl:value-of select="Zip"/><BR/> Home:<xsl:value-of select="HomePhone"/><br/> <i>Cell:<xsl:value-of select="Mobile"/></i><br/> eMail:<xsl:value-of select="email"/><br/> <br/> </xsl:template> </xsl:stylesheet> So what am I doing wrong ? I get absolutely nothing displayed from this? __________________________________________________ Do You Yahoo!? Yahoo! Auctions - buy the things you want at great prices http://auctions.yahoo.com/ XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] trying again: automaticly, Peter Flynn | Thread | Re: [xsl] what am I missing?, Mike Brown |
[xsl] trying again: automaticly ima, Janning Vygen | Date | Re: [xsl] trying again: automaticly, Peter Flynn |
Month |