[DoXQuery-Devel] doxquery/test/parser_tests/prolog prolog_test.expected,NONE,1.1 prolog_test.xqy,NON
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/prolog In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11861/test/parser_tests/prolog Added Files: prolog_test.expected prolog_test.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: prolog_test.xqy --- xquery version "1.0" encoding "utf8"; module namespace pre = "http://test"; declare boundary-space strip; declare ordering unordered; declare default order empty greatest; declare copy-namespaces no-preserve, no-inherit; declare default collation "http://www.w3.org/2005/02/xpath-functions/collation/codepoint"; declare base-uri "http://hello"; declare construction strip; declare namespace bar = "urn:bar"; declare default function namespace "http://test"; import schema "http://test" at "test.schema"; declare variable $pre:little as processing-instruction("foo") external; declare variable $pre:medium := (3, 3.5, $pre:little); (: declare variable $pre:millenial := for $a in (1 to 5) return $a * 3; :) declare function pre:foo($a as element(foo), $b as item(), $c as xs:QName*) { (: $b treat as xs:string * + 5, :) (: / * - 5, :) <foo lala="franklin&jimmy""largeÿ{ (: $a/udder :) 7 }"> not funny <really> { (#fart#fartfart#) { (: $c :) 5 } } <!-- incidently --> </foo> }; declare function pre:noggin() as item() external; --- NEW FILE: prolog_test.expected --- -- 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 bar => urn:bar 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 pre => http://test fn => http://www.w3.org/2005/02/xpath-functions Default Element Namespace: Default Function Namespace: http://test Schema Element Definitions: define element {http://test}element substitutes for {http://test}noggin of type {http://www.w3.org/2001/XMLSchema}QName define element {http://test}purchaseOrder of type {http://test}PurchaseOrderType define element {http://test}apt of type {http://test}[Anon3] define element {http://test}address of type {http://test}USAddress define element {http://test}noggin of type {http://test}[Anon4] define element {http://test}usaddress substitutes for {http://test}address of type {http://test}USAddress define element {http://test}nycaddress substitutes for {http://test}usaddress of type {http://test}NYCAddress define element {http://test}comment of type {http://www.w3.org/2001/XMLSchema}string Schema Attribute Definitions: define attribute {http://test}attr of type {http://www.w3.org/2001/XMLSchema}string Schema Type Definitions: define type {http://test}[Anon2] restricts {http://www.w3.org/2001/XMLSchema}positiveInteger define type {http://test}type { (({http://www.w3.org/2005/02/xpath-datatypes}dayTimeDuration | {http://www.w3.org/2001/XMLSchema}anyURI*) & {http://www.w3.org/2005/02/xpath-datatypes}untyped & {http://www.w3.org/2001/XMLSchema}float)? } define type {http://test}[Anon4] { (({http://www.w3.org/2005/02/xpath-datatypes}dayTimeDuration | {http://www.w3.org/2001/XMLSchema}anyURI*) & {http://www.w3.org/2005/02/xpath-datatypes}untyped & {http://www.w3.org/2001/XMLSchema}float)? } define type {http://test}[Anon1] { (element {http://test}productName of type {http://www.w3.org/2001/XMLSchema}string, element {http://test}quantity of type {http://test}[Anon2], element {http://test}USPrice of type {http://www.w3.org/2001/XMLSchema}decimal, element {http://test}comment?, element {http://test}shipDate of type {http://www.w3.org/2001/XMLSchema}date?) } define type {http://test}simpleType restricts {http://www.w3.org/2001/XMLSchema}string define type {http://test}PurchaseOrderType { (attribute {http://test}orderDate of type {http://www.w3.org/2001/XMLSchema}date?, element {http://test}shipTo of type {http://test}USAddress, element {http://test}billTo of type {http://test}USAddress, element {http://test}comment?, element {http://test}items of type {http://test}Items) } define type {http://test}Items { (attribute {http://test}partNum of type {http://test}SKU, element {http://test}item of type {http://test}[Anon1]*) } define type {http://test}NYCAddress extends {http://test}USAddress { element {http://test}apt } define type {http://test}[Anon3] restricts {http://www.w3.org/2001/XMLSchema}positiveInteger define type {http://test}USAddress { (attribute {http://test}country of type {http://www.w3.org/2001/XMLSchema}NMTOKEN?, element {http://test}name of type {http://www.w3.org/2001/XMLSchema}string, element {http://test}street of type {http://www.w3.org/2001/XMLSchema}string, element {http://test}city of type {http://www.w3.org/2001/XMLSchema}string, element {http://test}state of type {http://www.w3.org/2001/XMLSchema}string, element {http://test}zip of type {http://www.w3.org/2001/XMLSchema}decimal) } define type {http://test}SKU restricts {http://www.w3.org/2001/XMLSchema}string 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: {http://test}noggin[0] => () as (element | attribute | text | document | comment | processing-instruction | {http://www.w3.org/2005/02/xpath-datatypes}anyAtomicType) {http://test}foo[3] => ($a as element foo nillable of type {http://www.w3.org/2001/XMLSchema}anyType, $b as (element | attribute | text | document | comment | processing-instruction | {http://www.w3.org/2005/02/xpath-datatypes}anyAtomicType), $c as {http://www.w3.org/2001/XMLSchema}QName*) as (element | attribute | text | document | comment | processing-instruction | {http://www.w3.org/2005/02/xpath-datatypes}anyAtomicType)* 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: UNORDERED Default Empty Ordering Mode: GREATEST Boundary Space Policy: STRIP Copy Namespaces Mode: no-preserve, no-inherit Base URI: http://hello Document Types: Collection Types: Default Collection Type: null Options: ----------------------------------------------- |