[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Flagging for No records found?

Subject: Re: Flagging for No records found?
From: "Andrew Chapman" <thechapmanclan@xxxxxxxxxxx>
Date: Wed, 11 Feb 2004 09:47:48 -0800
andrew chapman
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) &gt; $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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.