[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: <xsl:if ... question
hello brian to make your XMl well formed,i made the following assumption 1. The root node is called <root> The way to compare is to use the xsl:key.. the following code will hep you <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:key match="/root/resources/resource" name="identifier" use="@identifier"/> <xsl:template match="/"> <xsl:for-each select="//item"> <xsl:variable name="identifier" select="key('identifier',@identifierref)"/> <xsl:if test="$identifier"> <a href="{$identifier/@href}"><xsl:value-of select="title"/></a><br/> </xsl:if> </xsl:for-each> </xsl:template> </xsl:stylesheet> Vasu From: Brian Hickey <brian_hickey1@xxxxxxxxx> Reply-To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx To: XSL-List@xxxxxxxxxxxxxxxxxxxxxx Subject: <xsl:if ... question Date: Tue, 23 Jul 2002 02:53:45 -0700 (PDT) _________________________________________________________________ Join the world?s largest e-mail service with MSN Hotmail. http://www.hotmail.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
|