[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: xsl string comparison fails why?
[ Yates, Danny] > For the first state (Alabama), "admissions/state/text()" > evaluates to something like: > > Alabama<cr><space><space><cr><space><space> > > Which is NOT the same as: > > Alabama > > You can solve this either by using normalize-space() or by > changing your <state> elements so that they don't use a mixed > content model (i.e. containing both text and other elements). e.g.: > Actually, even nomalize-space() does not quite do it because it collapses all the whitespace down to one space, resulting in Alabama<space> This still won't match "Alabama", but contains(.,$state) will work. After that, as Mike and Danny say, some redesign will probably be a good idea, either of the source or the stylesheet. Cheers, Tom P 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
|