This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
In these two queries the year 0001 in the original xquery appears as 2005 in xqueryx [ q ]: Queries/XQuery/Expressions/Operators/ArithExpr/DurationArith/DateTimesSubtract/op-subtract-dateTimes-yielding-DTD-8.xq [nq1]: xs:dateTime0001-01-01T01:01:01Z-xs:dateTime2005-07-06T12:12:12Z [nq2]: xs:dateTime2005-01-01T01:01:01Z-xs:dateTime2005-07-06T12:12:12Z [ q ]: Queries/XQuery/Expressions/Operators/ArithExpr/DurationArith/DatesSubtract/op-subtract-dates-yielding-DTD-8.xq [nq1]: xs:date0001-01-01Z-xs:date2005-07-06Z [nq2]: xs:date2005-01-01Z-xs:date2005-07-06Z
I'm sorry, David, but I'm not seeing your problem in the XQueryX tests. In op-subtract-dateTimes-yielding-DTD-8.xqx I see: <xqx:subtractOp> <xqx:firstOperand> <xqx:pathExpr> <xqx:stepExpr> <xqx:filterExpr> <xqx:functionCallExpr> <xqx:functionName xqx:prefix="xs">dateTime</xqx:functionName> <xqx:arguments> <xqx:pathExpr> <xqx:stepExpr> <xqx:filterExpr> <xqx:stringConstantExpr> <xqx:value>2005-01-01T01:01:01Z</xqx:value> </xqx:stringConstantExpr> </xqx:filterExpr> </xqx:stepExpr> </xqx:pathExpr> </xqx:arguments> </xqx:functionCallExpr> </xqx:filterExpr> </xqx:stepExpr> </xqx:pathExpr> </xqx:firstOperand> <xqx:secondOperand> <xqx:pathExpr> <xqx:stepExpr> <xqx:filterExpr> <xqx:functionCallExpr> <xqx:functionName xqx:prefix="xs">dateTime</xqx:functionName> <xqx:arguments> <xqx:pathExpr> <xqx:stepExpr> <xqx:filterExpr> <xqx:stringConstantExpr> <xqx:value>2005-07-06T12:12:12Z</xqx:value> </xqx:stringConstantExpr> </xqx:filterExpr> </xqx:stepExpr> </xqx:pathExpr> </xqx:arguments> </xqx:functionCallExpr> </xqx:filterExpr> </xqx:stepExpr> </xqx:pathExpr> </xqx:secondOperand> </xqx:subtractOp> The operands appear to be correct. I see something similar in op-subtract-dates-yielding-DTD-8.xq.
Both of the dates in the XqueryX you quoted were 2005. But unless something strange has happened to the files on my machine, the Xquery file looks as below, and the first date is 0001. David (:*******************************************************:) (:Test: op-subtract-dateTimes-yielding-DTD-8 :) (:Written By: Carmelo Montanez :) (:Date: July 6, 2005 :) (:Purpose: Evaluates The "subtract-dateTimes-yielding-DTD" operator that :) (:returns a negative value. :) (:*******************************************************:) xs:dateTime("0001-01-01T01:01:01Z") - xs:dateTime("2005-07-06T12:12:12Z")
Currently, on a WindowsXP machine, I am getting the correct results with the latest Oracle parser which is used to generate XQueryX for XQTS. These results validate with xqueryx.xsd, and convert back to original xquery with the stylesheet. These results, however, seem to be missing in the XQTS 0.8.6 Ravi, could you check why these results are not included in XQTS 0.8.6?
This should be fixed in XQTS 0.9.0 release.