[DoXQuery-Devel] doxquery/test/parser_tests/bugs bug1196090.expected,NONE,1.1 bug1196090.xqy,NONE,1.
Status: Pre-Alpha
Brought to you by:
jpcs
From: John S. <jp...@us...> - 2005-05-06 01:19:04
|
Update of /cvsroot/doxquery/doxquery/test/parser_tests/bugs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11861/test/parser_tests/bugs Added Files: bug1196090.expected bug1196090.xqy Log Message: Fixed bug #1196090, an issue with the lexer and comments in certain positions. Added a functional regression test suits for the parser, which compares query AST output to the expected results. The tests can be built using the ant target "compile_test", and run using the target "test". --- NEW FILE: bug1196090.expected --- FLWORExpr(5:1) ForBinding(5:6): VarName(5:6): a Expr(5:13) PathExpr(5:13) FunctionCall(5:13): doc StringLiteral(5:17): tests/usecases my/bib.xml RelativePathOp(5:45): / AbbrevForwardStep(5:46) QName(5:46): bib RelativePathOp(5:49): / AbbrevForwardStep(5:50) QName(5:50): book PathExpr(6:13) FunctionCall(6:13): doc StringLiteral(6:17): tests/usecases my/bib.xml RelativePathOp(6:45): // AbbrevForwardStep(6:47) QName(6:47): book ForBinding(7:6): VarName(7:6): b PathExpr(7:11) FunctionCall(7:11): doc StringLiteral(7:15): tests/usecases my/bib_1.xml RelativePathOp(7:45): // AbbrevForwardStep(7:47) QName(7:47): book ForBinding(8:6): VarName(8:6): c Expr(8:12) PathExpr(8:12) VarRef(8:12): a RelativePathOp(8:14): // AbbrevForwardStep(8:16) QName(8:16): title VarRef(8:23): b WhereClause(9:1) AndExpr(9:7) ComparisonExpr(9:7) FunctionCall(9:7): count PathExpr(9:13) VarRef(9:13): b RelativePathOp(9:15): / AxisStep(9:16) AbbrevForwardStep(9:16) QName(9:16): author Predicate(9:22) ComparisonExpr(9:23) AbbrevForwardStep(9:23): @ QName(9:24): lastname GeneralComp(9:32): = StringLiteral(9:33): John GeneralComp(9:42): = IntegerLiteral(9:44): 5 ComparisonExpr(10:11) PathExpr(10:11) VarRef(10:11): a RelativePathOp(10:13): / AbbrevForwardStep(10:14) QName(10:14): name GeneralComp(10:19): = PathExpr(10:21) VarRef(10:21): b RelativePathOp(10:23): / AbbrevForwardStep(10:24) QName(10:24): name QuantifiedExpr(12:12): some QuantifiedBinding(12:18): VarName(12:18): b100 PathExpr(12:26) VarRef(12:26): a RelativePathOp(12:28): / AbbrevForwardStep(12:29) QName(12:29): aaa ComparisonExpr(12:44) VarRef(12:44): b NodeComp(12:47): is VarRef(12:50): a DirElemConstructor(14:3) QName(14:4): book-with-prices DirAttributeList(14:20) ElementContentChar(14:21): Expr(16:3) VarRef(16:3): c VarRef(16:7): d ElementContentChar(17:4): QName(18:5): book-with-prices -- Static Context ----------------------------- Namespaces: op => http://www.w3.org/2005/02/xpath-operators fs => http://www.w3.org/2005/02/xpath-formal-semantics xsi => http://www.w3.org/2001/XMLSchema-instance local => http://www.w3.org/2005/02/xquery-local-functions err => http://www.w3.org/2005/02/xqt-errors dm => http://www.w3.org/2005/02/xpath-datamodel xs => http://www.w3.org/2001/XMLSchema xdt => http://www.w3.org/2005/02/xpath-datatypes xml => http://www.w3.org/XML/1998/namespace fn => http://www.w3.org/2005/02/xpath-functions Default Element Namespace: Default Function Namespace: http://www.w3.org/2005/02/xpath-functions Schema Element Definitions: Schema Attribute Definitions: Schema Type Definitions: define type {http://www.w3.org/2005/02/xpath-datatypes}anyAtomicType restricts {http://www.w3.org/2001/XMLSchema}anySimpleType { ({http://www.w3.org/2001/XMLSchema}string | {http://www.w3.org/2001/XMLSchema}boolean | {http://www.w3.org/2001/XMLSchema}decimal | {http://www.w3.org/2001/XMLSchema}float | {http://www.w3.org/2001/XMLSchema}double | {http://www.w3.org/2001/XMLSchema}duration | {http://www.w3.org/2001/XMLSchema}dateTime | {http://www.w3.org/2001/XMLSchema}time | {http://www.w3.org/2001/XMLSchema}date | {http://www.w3.org/2001/XMLSchema}gYearMonth | {http://www.w3.org/2001/XMLSchema}gYear | {http://www.w3.org/2001/XMLSchema}gMonthDay | {http://www.w3.org/2001/XMLSchema}gDay | {http://www.w3.org/2001/XMLSchema}gMonth | {http://www.w3.org/2001/XMLSchema}hexBinary | {http://www.w3.org/2001/XMLSchema}base64Binary | {http://www.w3.org/2001/XMLSchema}anyURI | {http://www.w3.org/2001/XMLSchema}QName | {http://www.w3.org/2001/XMLSchema}NOTATION) } define type {http://www.w3.org/2001/XMLSchema}double restricts {http://www.w3.org/2005/02/xpath-datatypes}anyAtomicType define type {http://www.w3.org/2001/XMLSchema}hexBinary restricts {http://www.w3.org/2005/02/xpath-datatypes}anyAtomicType define type {http://www.w3.org/2005/02/xpath-datatypes}untypedAtomic restricts {http://www.w3.org/2005/02/xpath-datatypes}anyAtomicType define type {http://www.w3.org/2001/XMLSchema}anyURI restricts {http://www.w3.org/2005/02/xpath-datatypes}anyAtomicType define type {http://www.w3.org/2005/02/xpath-datatypes}untyped restricts {http://www.w3.org/2001/XMLSchema}anyType { (attribute of type {http://www.w3.org/2005/02/xpath-datatypes}untypedAtomic*, (element of type {http://www.w3.org/2005/02/xpath-datatypes}untyped? & text? & comment? & processing-instruction?)*) } define type {http://www.w3.org/2001/XMLSchema}NOTATION restricts {http://www.w3.org/2005/02/xpath-datatypes}anyAtomicType define type {http://www.w3.org/2001/XMLSchema}duration restricts {http://www.w3.org/2005/02/xpath-datatypes}anyAtomicType define type {http://www.w3.org/2001/XMLSchema}string restricts {http://www.w3.org/2005/02/xpath-datatypes}anyAtomicType define type {http://www.w3.org/2001/XMLSchema}nonNegativeInteger restricts {http://www.w3.org/2001/XMLSchema}integer define type {http://www.w3.org/2001/XMLSchema}ENTITY restricts {http://www.w3.org/2001/XMLSchema}Name define type {http://www.w3.org/2001/XMLSchema}base64Binary restricts {http://www.w3.org/2005/02/xpath-datatypes}anyAtomicType define type {http://www.w3.org/2001/XMLSchema}gMonth restricts {http://www.w3.org/2005/02/xpath-datatypes}anyAtomicType define type {http://www.w3.org/2001/XMLSchema}NMTOKENS restricts {http://www.w3.org/2001/XMLSchema}anySimpleType { {http://www.w3.org/2001/XMLSchema}NMTOKEN+ } define type {http://www.w3.org/2001/XMLSchema}decimal restricts {http://www.w3.org/2005/02/xpath-datatypes}anyAtomicType define type {http://www.w3.org/2001/XMLSchema}token restricts {http://www.w3.org/2001/XMLSchema}normalizedString define type {http://www.w3.org/2001/XMLSchema}anySimpleType restricts {http://www.w3.org/2001/XMLSchema}anyType { ({http://www.w3.org/2005/02/xpath-datatypes}untypedAtomic | {http://www.w3.org/2001/XMLSchema}string | {http://www.w3.org/2001/XMLSchema}boolean | {http://www.w3.org/2001/XMLSchema}decimal | {http://www.w3.org/2001/XMLSchema}float | {http://www.w3.org/2001/XMLSchema}double | {http://www.w3.org/2001/XMLSchema}duration | {http://www.w3.org/2001/XMLSchema}dateTime | {http://www.w3.org/2001/XMLSchema}time | {http://www.w3.org/2001/XMLSchema}date | {http://www.w3.org/2001/XMLSchema}gYearMonth | {http://www.w3.org/2001/XMLSchema}gYear | {http://www.w3.org/2001/XMLSchema}gMonthDay | {http://www.w3.org/2001/XMLSchema}gDay | {http://www.w3.org/2001/XMLSchema}gMonth | {http://www.w3.org/2001/XMLSchema}hexBinary | {http://www.w3.org/2001/XMLSchema}base64Binary | {http://www.w3.org/2001/XMLSchema}anyURI | {http://www.w3.org/2001/XMLSchema}QName | {http://www.w3.org/2001/XMLSchema}NOTATION)* } define type {http://www.w3.org/2001/XMLSchema}dateTime restricts {http://www.w3.org/2005/02/xpath-datatypes}anyAtomicType define type {http://www.w3.org/2001/XMLSchema}gMonthDay restricts {http://www.w3.org/2005/02/xpath-datatypes}anyAtomicType define type {http://www.w3.org/2001/XMLSchema}normalizedString restricts {http://www.w3.org/2001/XMLSchema}string define type {http://www.w3.org/2001/XMLSchema}language restricts {http://www.w3.org/2001/XMLSchema}token define type {http://www.w3.org/2001/XMLSchema}ENTITIES restricts {http://www.w3.org/2001/XMLSchema}anySimpleType { {http://www.w3.org/2001/XMLSchema}ENTITY+ } define type {http://www.w3.org/2001/XMLSchema}nonPositiveInteger restricts {http://www.w3.org/2001/XMLSchema}integer define type {http://www.w3.org/2001/XMLSchema}unsignedByte restricts {http://www.w3.org/2001/XMLSchema}unsignedShort define type {http://www.w3.org/2001/XMLSchema}float restricts {http://www.w3.org/2005/02/xpath-datatypes}anyAtomicType define type {http://www.w3.org/2001/XMLSchema}byte restricts {http://www.w3.org/2001/XMLSchema}short define type {http://www.w3.org/2001/XMLSchema}positiveInteger restricts {http://www.w3.org/2001/XMLSchema}nonNegativeInteger define type {http://www.w3.org/2001/XMLSchema}QName restricts {http://www.w3.org/2005/02/xpath-datatypes}anyAtomicType define type {http://www.w3.org/2001/XMLSchema}time restricts {http://www.w3.org/2005/02/xpath-datatypes}anyAtomicType define type {http://www.w3.org/2001/XMLSchema}date restricts {http://www.w3.org/2005/02/xpath-datatypes}anyAtomicType define type {http://www.w3.org/2001/XMLSchema}unsignedLong restricts {http://www.w3.org/2001/XMLSchema}nonNegativeInteger define type {http://www.w3.org/2001/XMLSchema}ID restricts {http://www.w3.org/2001/XMLSchema}Name define type {http://www.w3.org/2001/XMLSchema}IDREF restricts {http://www.w3.org/2001/XMLSchema}Name define type {http://www.w3.org/2001/XMLSchema}int restricts {http://www.w3.org/2001/XMLSchema}long define type {http://www.w3.org/2001/XMLSchema}IDREFS restricts {http://www.w3.org/2001/XMLSchema}anySimpleType { {http://www.w3.org/2001/XMLSchema}IDREF+ } define type {http://www.w3.org/2001/XMLSchema}gDay restricts {http://www.w3.org/2005/02/xpath-datatypes}anyAtomicType define type {http://www.w3.org/2001/XMLSchema}unsignedInt restricts {http://www.w3.org/2001/XMLSchema}unsignedLong define type {http://www.w3.org/2001/XMLSchema}unsignedShort restricts {http://www.w3.org/2001/XMLSchema}unsignedInt define type {http://www.w3.org/2001/XMLSchema}gYearMonth restricts {http://www.w3.org/2005/02/xpath-datatypes}anyAtomicType define type {http://www.w3.org/2001/XMLSchema}anyType restricts {http://www.w3.org/2001/XMLSchema}anyType { (attribute*, ({http://www.w3.org/2005/02/xpath-datatypes}anyAtomicType* | (element? & text? & comment? & processing-instruction?)*)) } define type {http://www.w3.org/2001/XMLSchema}Name restricts {http://www.w3.org/2001/XMLSchema}token define type {http://www.w3.org/2001/XMLSchema}gYear restricts {http://www.w3.org/2005/02/xpath-datatypes}anyAtomicType define type {http://www.w3.org/2001/XMLSchema}boolean restricts {http://www.w3.org/2005/02/xpath-datatypes}anyAtomicType define type {http://www.w3.org/2001/XMLSchema}NMTOKEN restricts {http://www.w3.org/2001/XMLSchema}token define type {http://www.w3.org/2001/XMLSchema}NCName restricts {http://www.w3.org/2001/XMLSchema}Name define type {http://www.w3.org/2001/XMLSchema}long restricts {http://www.w3.org/2001/XMLSchema}integer define type {http://www.w3.org/2001/XMLSchema}short restricts {http://www.w3.org/2001/XMLSchema}int define type {http://www.w3.org/2001/XMLSchema}integer restricts {http://www.w3.org/2001/XMLSchema}decimal define type {http://www.w3.org/2001/XMLSchema}negativeInteger restricts {http://www.w3.org/2001/XMLSchema}nonPositiveInteger Variable Types: Function Signatures: Collations: http://www.w3.org/2005/02/xpath-functions/collation/codepoint Default Collation: http://www.w3.org/2005/02/xpath-functions/collation/codepoint Construction Mode: STRIP Ordering Mode: ORDERED Default Empty Ordering Mode: LEAST Boundary Space Policy: PRESERVE Copy Namespaces Mode: no-preserve, no-inherit Base URI: null Document Types: Collection Types: Default Collection Type: null Options: ----------------------------------------------- --- NEW FILE: bug1196090.xqy --- (: A test for correct comment parsing, specified by bug number 1196090. :) for $a in ( doc("tests/usecases my/bib.xml")/bib/book, doc("tests/usecases my/bib.xml")//book ), $b in doc("tests/usecases my/bib_1.xml")//book, $c in ($a//title, $b) where count($b/author[@lastname="John"]) = 5 and $a/name = $b/name (: this is a comment in XQuery :) and (some $b100 in $a/aaa satisfies ($b is $a)) return <book-with-prices> { $c, $d } </book-with-prices> |