[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Flagging for No records found?
Michael That fixed it thanks. For everyone's reference here is the finished product. Thanks again Andrew ---------------------------------------------------------------------------- ------------------------ <?xml version="1.0"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:variable name="lowercase" select="'abcdefghijklmnopqrstuvwxyz'"/> <xsl:variable name="uppercase" select="'ABCDEFGHIJKLMNOPQRSTUVWXYZ'"/> <xsl:param name="product"/> <xsl:param name="var_content_type"/> <xsl:param name="technology"/> <xsl:param name="product_version"/> <xsl:param name="title"/> <xsl:param name="para"/> <xsl:param name="para_length"/> <xsl:param name="view_para"/> <xsl:variable name="uppertitle" select="translate($title,$lowercase,$uppercase)"/> <xsl:variable name="upperpara" select="translate($para,$lowercase,$uppercase)"/> <xsl:variable name="p" select="xdql/object/content/content_chunk [((product = $product) or ($product = 'All')) and ((content_type = $var_content_type) or ($var_content_type = 'All')) and ((technology = $technology) or ($technology = 'All')) and ((product_version = $product_version) or ($product_version = 'All')) and (contains(translate(content_link,$lowercase,$uppercase), $uppertitle) or ($title = 'All')) and (contains(translate(para,$lowercase,$uppercase), $upperpara) or ($para = 'All'))]"/> <xsl:template match="/"> <xsl:for-each select="$p"> <a> <xsl:attribute name="href"><xsl:value-of select="content_link/@ref"/></xsl:attribute> <xsl:value-of select="content_link"/> </a> (Version: <xsl:value-of select="product_version"/>) <xsl:choose> <xsl:when test="$view_para = 'true'"> <br/> <xsl:choose> <xsl:when test="$para_length = '-1'"> <xsl:value-of select="para"/> </xsl:when> <xsl:when test="$para_length != '-1'"> <xsl:value-of select="substring(para,1,$para_length)"/> <xsl:choose> <xsl:when test="string-length(para) > $para_length"> ... </xsl:when> </xsl:choose> </xsl:when> </xsl:choose> </xsl:when> </xsl:choose> <br/> </xsl:for-each> <xsl:if test="not(string($p))"> <b>No records found.</b> </xsl:if> </xsl:template> </xsl:stylesheet> 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
|