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

Re: Quering attributes

Subject: Re: Quering attributes
From: sdemler@xxxxxxxxxxx
Date: Wed, 15 Mar 2000 10:36:46 +1300
quering
I am using the XSL processor that comes with the Delphi CueSoft components.

The square brackets seem to be the only way of getting any output
whatsoever.

I have a template on the parent node and then I have a for each on the
children node. Each of these children have an attribute called
lapp_application_amount.

Since I sent the last email to the list I have had even stranger results.

XML

<dtqApplication>
        <ROWdtqApplication lapp_application_amount="10000" />
       <ROWdtqApplication lapp_application_amount="7500" />
       <ROWdtqApplication lapp_application_amount="100000" />
       <ROWdtqApplication lapp_application_amount="45000" />
       <ROWdtqApplication lapp_application_amount="1000000" />
       <ROWdtqApplication lapp_application_amount="4000" />
       <ROWdtqApplication lapp_application_amount="122000" />

XSL

<xsl:template match="dtqApplication">
    <xsl:for-each select="ROWdtqApplication">
      <xsl:if test="[@lapp_application_amount < 100000]">
        <xsl:value-of select="@lapp_application_amount"/>
      </xsl:if>
    </xsl:for-each>
  </xsl:template>

Examples of wierdness

xsl:if test="[@lapp_application_amount = 10000]"

= 10000 in output ( this is good and makes sense !)

xsl:if test="[@lapp_application_amount < 100001]"

= 10000, 100000, 1000000 in output ????? (this is crap !)

<xsl:if test="[@lapp_application_amount < 100000]"

= 10000 in output ???? (This is also crap !)


How can anyone explain these results ??? I am very confused and don't know
whether the XSL processor that I am using is buggy or whether I have got
the syntax right.







                                                                                                                           
                    Steve Tinney                                                                                           
                    <stinney@xxxxxxxxxxxx        To:     xsl-list@xxxxxxxxxxxxxxxx                                         
                    u>                           cc:                                                                       
                    Sent by:                     Subject:     Re: Quering attributes                                       
                    owner-xsl-list@mulber                                                                                  
                    rytech.com                                                                                             
                                                                                                                           
                                                                                                                           
                    14/03/2000 17:07                                                                                       
                    Please respond to                                                                                      
                    xsl-list                                                                                               
                                                                                                                           
                                                                                                                           




> <xsl:if test="[@lapp_application_amount > 10000]">

You don't say which XSL processor you are using, but you almost
certainly want to lose the square brackets.

It should work to say, e.g.:

  <xsl:if test="@lapp_application_amount > 10000">

 Steve


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list




 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.