This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 2570 - xqx: numeric syntax in xqueryx test files
Summary: xqx: numeric syntax in xqueryx test files
Status: CLOSED FIXED
Alias: None
Product: XML Query Test Suite
Classification: Unclassified
Component: XML Query Test Suite (show other bugs)
Version: 0.8.4
Hardware: PC Windows XP
: P2 normal
Target Milestone: ---
Assignee: Ravindranath (Ravi) Chennoju
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-12-09 00:50 UTC by David Carlisle
Modified: 2006-08-01 13:32 UTC (History)
0 users

See Also:


Attachments

Description David Carlisle 2005-12-09 00:50:59 UTC
The xquery to xqueryx conversion used is not preserving the syntax used in
numeric literals (or strings cast to numeric types)


for example op-numeric-multiplydbl2args-1

xs:double("-1.7976931348623157E308") in the xquery version is encoded as

                <xqx:functionCallExpr>
                  <xqx:functionName xqx:prefix="xs">double</xqx:functionName>
                  <xqx:arguments>
                    <xqx:pathExpr>
                      <xqx:stepExpr>
                        <xqx:filterExpr>
                          <xqx:stringConstantExpr>
                           
<xqx:value>-179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000</xqx:value>
                          </xqx:stringConstantExpr>
                        </xqx:filterExpr>
                      </xqx:stepExpr>
                    </xqx:pathExpr>
                  </xqx:arguments>
                </xqx:functionCallExpr>


Note here it's not really a double literal that's being expanded with 0's but a
_string_ literal, so the xqueryx expression is really quite different from the
xquery one of the same name.

for comparison, xq2xqx encodes the above as

               <xqx:functionCallExpr>
                  <xqx:functionName xqx:prefix="xs">double</xqx:functionName>
                  <xqx:arguments>
                     <xqx:stringConstantExpr>
                        <xqx:value>-1.7976931348623157E308</xqx:value>
                     </xqx:stringConstantExpr>
                  </xqx:arguments>
               </xqx:functionCallExpr>

which seems a more natural encoding, using the same string as the xquery
version, and without the superfluous pathexp/stepexpr/filterexpr

The following conversions similarly have extra 000 in the xqueryx

David


Expressions/Operators/ArithExpr/NumericOpr/NumericAdd/op-numeric-adddbl2args-1.xq
Expressions/Operators/ArithExpr/NumericOpr/NumericAdd/op-numeric-adddbl2args-2.xq
Expressions/Operators/ArithExpr/NumericOpr/NumericAdd/op-numeric-adddbl2args-4.xq
Expressions/Operators/ArithExpr/NumericOpr/NumericAdd/op-numeric-addflt2args-1.xq
Expressions/Operators/ArithExpr/NumericOpr/NumericAdd/op-numeric-addflt2args-2.xq
Expressions/Operators/ArithExpr/NumericOpr/NumericAdd/op-numeric-addflt2args-3.xq
Expressions/Operators/ArithExpr/NumericOpr/NumericAdd/op-numeric-addflt2args-4.xq
Expressions/Operators/ArithExpr/NumericOpr/NumericSubtract/op-numeric-subtractdbl2args-1.xq
Expressions/Operators/ArithExpr/NumericOpr/NumericSubtract/op-numeric-subtractdbl2args-2.xq
Expressions/Operators/ArithExpr/NumericOpr/NumericSubtract/op-numeric-subtractdbl2args-3.xq
Expressions/Operators/ArithExpr/NumericOpr/NumericSubtract/op-numeric-subtractdbl2args-4.xq
Expressions/Operators/ArithExpr/NumericOpr/NumericSubtract/op-numeric-subtractdbl2args-5.xq
Expressions/Operators/ArithExpr/NumericOpr/NumericSubtract/op-numeric-subtractflt2args-1.xq
Expressions/Operators/ArithExpr/NumericOpr/NumericSubtract/op-numeric-subtractflt2args-2.xq
Expressions/Operators/ArithExpr/NumericOpr/NumericSubtract/op-numeric-subtractflt2args-3.xq
Expressions/Operators/ArithExpr/NumericOpr/NumericSubtract/op-numeric-subtractflt2args-4.xq
Expressions/Operators/ArithExpr/NumericOpr/NumericSubtract/op-numeric-subtractflt2args-5.xq
Expressions/Operators/ArithExpr/NumericOpr/NumericMultiply/op-numeric-multiplydbl2args-1.xq
Expressions/Operators/ArithExpr/NumericOpr/NumericMultiply/op-numeric-multiplydbl2args-2.xq
Expressions/Operators/ArithExpr/NumericOpr/NumericMultiply/op-numeric-multiplydbl2args-3.xq
Expressions/Operators/ArithExpr/NumericOpr/NumericMultiply/op-numeric-multiplydbl2args-4.xq
Expressions/Operators/ArithExpr/NumericOpr/NumericMultiply/op-numeric-multiplydbl2args-5.xq
Expressions/Operators/ArithExpr/NumericOpr/NumericMultiply/op-numeric-multiplyflt2args-1.xq
Expressions/Operators/ArithExpr/NumericOpr/NumericMultiply/op-numeric-multiplyflt2args-3.xq
Expressions/Operators/ArithExpr/NumericOpr/NumericMultiply/op-numeric-multiplyflt2args-5.xq
Expressions/Operators/ArithExpr/NumericOpr/NumericDivide/op-numeric-dividedbl2args-1.xq
Expressions/Operators/ArithExpr/NumericOpr/NumericDivide/op-numeric-dividedbl2args-2.xq
Expressions/Operators/ArithExpr/NumericOpr/NumericDivide/op-numeric-dividedbl2args-3.xq
Expressions/Operators/ArithExpr/NumericOpr/NumericDivide/op-numeric-dividedbl2args-4.xq
Expressions/Operators/ArithExpr/NumericOpr/NumericDivide/op-numeric-divideflt2args-1.xq
Expressions/Operators/ArithExpr/NumericOpr/NumericDivide/op-numeric-divideflt2args-3.xq
Expressions/Operators/ArithExpr/NumericOpr/NumericDivide/op-numeric-divideflt2args-4.xq
Expressions/Operators/ArithExpr/NumericOpr/NumericMod/op-numeric-moddbl2args-1.xq
Functions/SeqFunc/AggregateSeqFunc/SeqSUMFunc/fn-sumdbl2args-1.xq
Functions/SeqFunc/AggregateSeqFunc/SeqSUMFunc/fn-sumdbl2args-2.xq
Functions/SeqFunc/AggregateSeqFunc/SeqSUMFunc/fn-sumdbl2args-3.xq
Functions/SeqFunc/AggregateSeqFunc/SeqSUMFunc/fn-sumdbl2args-4.xq
Functions/SeqFunc/AggregateSeqFunc/SeqSUMFunc/fn-sumflt2args-1.xq
Functions/SeqFunc/AggregateSeqFunc/SeqSUMFunc/fn-sumflt2args-2.xq
Functions/SeqFunc/AggregateSeqFunc/SeqSUMFunc/fn-sumflt2args-3.xq
Functions/SeqFunc/AggregateSeqFunc/SeqSUMFunc/fn-sumflt2args-4.xq
Functions/SeqFunc/AggregateSeqFunc/SeqSUMFunc/fn-sumdbl3args-1.xq
Functions/SeqFunc/AggregateSeqFunc/SeqSUMFunc/fn-sumdbl3args-2.xq
Functions/SeqFunc/AggregateSeqFunc/SeqSUMFunc/fn-sumdbl3args-3.xq
Functions/SeqFunc/AggregateSeqFunc/SeqSUMFunc/fn-sumdbl3args-4.xq
Functions/SeqFunc/AggregateSeqFunc/SeqSUMFunc/fn-sumdbl3args-6.xq
Functions/SeqFunc/AggregateSeqFunc/SeqSUMFunc/fn-sumflt3args-1.xq
Functions/SeqFunc/AggregateSeqFunc/SeqSUMFunc/fn-sumflt3args-2.xq
Functions/SeqFunc/AggregateSeqFunc/SeqSUMFunc/fn-sumflt3args-3.xq
Functions/SeqFunc/AggregateSeqFunc/SeqSUMFunc/fn-sumflt3args-4.xq
Functions/SeqFunc/AggregateSeqFunc/SeqSUMFunc/fn-sumflt3args-6.xq
Comment 1 David Carlisle 2006-08-01 13:31:57 UTC
I never had any feedback, but this seems to be fixed now, so closing