Re: [xsl] Why doesn test work in one case, but not another???

Subject: Re: [xsl] Why doesn test work in one case, but not another???
From: Shirley Gasch <sgasch@xxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 10 May 2006 17:40:41 -0400
Hi Jon,

I did try building it from scratch, but with no better result.

I need to understand better how the test works. In the example that worked, the MssnTer is a fieldname and Y is one of the possible values. In the one that didn't work, System is a fieldname and A is one of the values. I tried removing the ' ', but no change. It always falls through the test with system.


On 5/10/06, Shirley Gasch <sgasch@xxxxxxxxxxxxxxxxxxxxx> wrote:
Hi again John,

This time, I put in only the first test and then put in the text
"Unknown" in the part where it should go if it fails the test - it
fails the test all of the time!

Well, that's not a huge surprise. Are you sure it ever worked? I quickly went through and tried to shift through your when statements and I'm seeing things like this:

<xsl:when test="'MssnTer' = 'Y'">

the string MssnTer will never be the same as the string Y.  This is
the same as saying

when test=" 0 = 1".

You mentioned something about this being automatically generated xslt. Have you cleaned up the file or did you post it straight from the output tool? The xslt seems hard to read to me a bit confusing, perhaps start simple and build it up.

Jon Gorman

-- Shirley Gasch Phone: (301) 794-2164 Computer Sciences Corporation Fax: (301) 794-8355 7700 Hubble Drive, Rm N384 Lanham/Seabrook, Md. 20706 email: sgasch@xxxxxxx

Current Thread