[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] If/then/else confusion
Hello,
I am trying to modify a sort-select statement I worked out a very long time ago. In the original, I wanted not to sort by a <Prefix> if it were an 'A' and this code does just that: <xsl:sort select="if( Prefix!='A' ) then Prefix else ''"/> I am not sure why its positive version does not work: <xsl:sort select="if( Prefix='A' ) then '' else Prefix"/> However, my new task is to not sort by (1) <Prefix> if the prefix is 'A' or, (2) if the <CatalogName> contains 'SG'. In the positive the statement look is: <xsl:sort select="if( Prefix='A' or contains(CatalogName, 'SG')) then '' else Prefix"/> That statement somehow works for the second filter, [the contains], but not the first [the prefix='A']. I have no idea what is going on and would appreciate any help I can get. Thanks, Merry Christmas, Mark
|
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
|