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

Re:Re:How to robustly handle mulple conditions in xslt

Subject: Re:Re:How to robustly handle mulple conditions in xslt format
From: "Yang" <sfyang@xxxxxxxxxxxxx>
Date: Fri, 25 May 2001 19:34:22 +0800
multiple conditions in xslt
Hi, Jeni,

Thanks for nice input of building XML structure to handle multiple
conditions.
It is certainly a good suggestions I can use.  But I start to worry about
the performance
problem from using the complicated predicates.

Changing each variable original expressed by $xx into $variables[@name='xx']
,
I have modified following predicates which have been simplified from your
suggestions;

<xsl:variable name="MSource" select="//z:row[---]" />
where [---] is as following;

[substring(@SalesOrderNo[string($month)], 10, 2) = $month]
[substring(@SalesOrderNo[string($dayID)], 12, 2) = $dayID]
[substring(substring-after(@CreateDate[string($timeID)],'T'),1,2) = $timeID]
[normalize-space(@SalesCode[string($salesID)])=$salesID]
[normalize-space(@CustomerCode[string($customerID)])=$customerID]
[normalize-space(@StoreCode[string($storeID)])=$storeID]
[normalize-space(@SalesOrderNo[string($salenoID)])=$salenoID]

Now the modified form like this;

[substring(@SalesOrderNo[string($variable[@name='month']], 10, 2) =
$variable[@name='month'] ]
[substring(@SalesOrderNo[string($variable[@name='dayID'])], 12, 2) =
$variable[@name='dayID']]
[substring(substring-after(@CreateDate[string($variable[@name='timeID'])],'T
'),1,2) = $variable[@name='timeID']]
[normalize-space(@SalesCode[string($variable[@name='salesID'])])=$variable[@
name='salesID']]
[normalize-space(@CustomerCode[string($variable[@name='customerID']])=$varia
ble[@name='customerID']]
[normalize-space(@StoreCode[string($variable[@name='storeID']])=$variable[@n
ame='storeID']]
[normalize-space(@SalesOrderNo[string($variable[@name='salenoID'])])=$variab
le[@name='salenoID']]

Will this awful expression be considered a normal one to address solution of
a real world problem?  Will it affect the performance?

Sun-fu Yang,

sfyang@xxxxxxxxxxxxx



 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.