RE: [xsl] implementing for-each for comparision

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

> 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 
> 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".


Jarno - VNV Nation: Legion

 XSL-List info and archive:

Current Thread