|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: implementing for-each for 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
|
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
|

Cart








