[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] what am I missing?
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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|