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

RE: implementing for-each for comparision

Subject: RE: implementing for-each for comparision
From: Jarno.Elovirta@xxxxxxxxx
Date: Fri, 3 Oct 2003 08:32:51 +0300
xsl string comparision
Hi,

> I am able to get the output properly if there is no col4 in 
> the mapping file 
> i.e. file2 then not writing line 5 above in the output.

Could you show the stylesheet, or rather, a self-contained stylesheet that displays the problem you have.

> I want to implement something like
>  1) Read each column from the File1.
>  2) Match it will all the columns of File2

Note that in the two example documents you use column names "col1" and "Col1", and XPath 1.0 does only case-sensitive string comparisons.

>  3) If name of column is same then get the value of column 
> from file1 and 
> check if datatype attribute is date then output "Date 
> MM:DD:YYYY HH:MI:SS AM" 
> otherwise don't do anything.

xsl:if for that.

>  4) If match exit from the for loop (is this possible in xsl)

Yes, if the loop is a recursive template call, but not if you're processing using xsl:for-each or xsl:apply-templates as they're not "loops".

Cheers,

Jarno - VNV Nation: Legion

 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.