"Internationalization issues" are not being "ignored" -- they are just not
part of the language.  XPath has a lexical structure just like any other
programming language.  See the recommendation for more information:

   http://www.w3.org/TR/xpath#NT-Number

There is absolutely no way XPath should be considering locale when doing
numeric conversions, since doing so could completely change the semantic
meaning of a stylesheet from one locale to another.  That's a task better
left to stylesheet authors, who can control such conversions as appropriate
within their stylesheets.

XPath doesn't define comparisons based on string.  I'm not sure exactly why
the working group went this way, but I suspect it's because collating
strings can be very unpredictable given the complexity of Unicode collation
algorithms.

Dave



                                                                                       
      
                    Everett                                                            
      
                    Stauffer             To:     [EMAIL PROTECTED]              
      
                    <everett@chem        cc:     (bcc: David N Bertoni/CAM/Lotus)      
      
                    .ucsd.edu>           Subject:     Re: RelationalExpr doing alpha   
      
                                         comparisons?                                  
      
                    07/16/2001                                                         
      
                    04:45 PM                                                           
      
                    Please                                                             
      
                    respond to                                                         
      
                    xalan-dev                                                          
      
                                                                                       
      
                                                                                       
      





[EMAIL PROTECTED] wrote:
>
> Everett Stauffer asks:
> >What is the exact format of the "numeric" data as text?
>
> But the expression that started this thread is:
> >  <xsl:when test="//Number &gt; //HighestNumber">
>
> If you break down that expression as Xalan would, the top of the
> expression is &gt; (or > if you will), which says that a boolean
> will result. According to XPath 3.4, the two sides of > or any other
> inequality relation must be taken as numbers. I would hope that we
> would force //Number to be numeric just on that basis alone.
> .................David Marston

After this came up I checked back and found 3.4 and realized why
having to use number() would be considered a bug.

On the other hand, I don't have any conceptual problem with such
a comparison based on strings.

The only 'concern' I have at this point has to do with the exact
format of the data for the purposes of a conversion (explicit
or implicit.)  Dave Bertoni states that no locale-specific information
was being used.  Does this mean that "1000,00" wouldn't work
even if it is the proper locale equivalent of "1000.00"?
Are "internationalization" issues really being ignored?




Reply via email to