[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Re: XPath incompatibilities

Subject: RE: Re: XPath incompatibilities
From: "Michael Kay" <michael.h.kay@xxxxxxxxxxxx>
Date: Wed, 2 Jan 2002 09:43:52 -0000
RE:  Re: XPath incompatibilities
> Miloslav Nic wrote:
> > ========================================
> > 2. The rules for converting a string to a boolean have changed, so
> > they are now aligned with XML Schema. In XPath 2.0, the strings "0"
> > and "false" are treated as false, while in XPath 1.0, they were
> > treated as true. All other strings are converted in the same way as
> > XPath 1.0.
> > ----------------------------------------
> >
> > I would prefer the 1.0 way. It is a rule which can become dangerous
> > doing text processing.
>
> [Jeni Tennison agreed] that it's dangerous when doing text processing,
certainly if
> test whether there's any remaining string in the normal way
> (test="$string"). If this change were made, we would need to change
> all those recursive string manipulation algorithms so that they used
> test="string-length($string)" instead, or something similar.
>

I'm sure we'll review this one again, but I wouldn't like to guess what the
outcome would be. There is still work underway on exactly how schemaless
documents fit into the type system, which has a bearing on this question.
Meanwhile I'd suggest everyone gets into the habit of writing
   test="$string != ''"
which is unambiguous.

Mike Kay


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.