Merge lp:~zorba-coders/zorba/windowing-tests into lp:zorba

Proposed by Matthias Brantner
Status: Rejected
Rejected by: Chris Hillery
Proposed branch: lp:~zorba-coders/zorba/windowing-tests
Merge into: lp:zorba
Diff against target: 1254 lines (+568/-124)
79 files modified
test/rbkt/ExpQueryResults/zorba/windowing/q10s.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/windowing/q11s.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/windowing/q12.xml.res (+1/-1)
test/rbkt/ExpQueryResults/zorba/windowing/q12s.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/windowing/q13s.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/windowing/q14.xml.res (+1/-1)
test/rbkt/ExpQueryResults/zorba/windowing/q14s.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/windowing/q15.xml.res (+1/-1)
test/rbkt/ExpQueryResults/zorba/windowing/q15s.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/windowing/q16.xml.res (+1/-1)
test/rbkt/ExpQueryResults/zorba/windowing/q16s.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/windowing/q17s.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/windowing/q18s.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/windowing/q19.xml.res (+1/-12)
test/rbkt/ExpQueryResults/zorba/windowing/q19s.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/windowing/q1s.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/windowing/q2s.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/windowing/q3.xml.res (+1/-1)
test/rbkt/ExpQueryResults/zorba/windowing/q3s.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/windowing/q4.xml.res (+1/-1)
test/rbkt/ExpQueryResults/zorba/windowing/q4s.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/windowing/q5.xml.res (+1/-1)
test/rbkt/ExpQueryResults/zorba/windowing/q5s.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/windowing/q6s.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/windowing/q7s.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/windowing/q8.xml.res (+1/-10)
test/rbkt/ExpQueryResults/zorba/windowing/q8s.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/windowing/q9.xml.res (+1/-1)
test/rbkt/ExpQueryResults/zorba/windowing/q9s.xml.res (+2/-0)
test/rbkt/Queries/CMakeLists.txt (+3/-0)
test/rbkt/Queries/zorba/windowing/arrange_rows.xml (+1/-1)
test/rbkt/Queries/zorba/windowing/arrange_rows.xsd (+9/-0)
test/rbkt/Queries/zorba/windowing/cxml.xml (+1/-1)
test/rbkt/Queries/zorba/windowing/cxml.xsd (+44/-0)
test/rbkt/Queries/zorba/windowing/head_para.xsd (+12/-0)
test/rbkt/Queries/zorba/windowing/person_events.xml (+1/-2)
test/rbkt/Queries/zorba/windowing/person_events.xsd (+17/-0)
test/rbkt/Queries/zorba/windowing/q1.xq (+1/-1)
test/rbkt/Queries/zorba/windowing/q10.xq (+2/-2)
test/rbkt/Queries/zorba/windowing/q10s.xq (+12/-0)
test/rbkt/Queries/zorba/windowing/q11.xq (+2/-2)
test/rbkt/Queries/zorba/windowing/q11s.xq (+15/-0)
test/rbkt/Queries/zorba/windowing/q12.xq (+8/-10)
test/rbkt/Queries/zorba/windowing/q12s.xq (+12/-0)
test/rbkt/Queries/zorba/windowing/q13.xq (+4/-4)
test/rbkt/Queries/zorba/windowing/q13s.xq (+13/-0)
test/rbkt/Queries/zorba/windowing/q14.xq (+1/-1)
test/rbkt/Queries/zorba/windowing/q14s.xq (+13/-0)
test/rbkt/Queries/zorba/windowing/q15.xq (+5/-6)
test/rbkt/Queries/zorba/windowing/q15s.xq (+18/-0)
test/rbkt/Queries/zorba/windowing/q16.xq (+6/-6)
test/rbkt/Queries/zorba/windowing/q16s.xq (+23/-0)
test/rbkt/Queries/zorba/windowing/q17.xq (+4/-4)
test/rbkt/Queries/zorba/windowing/q17s.xq (+21/-0)
test/rbkt/Queries/zorba/windowing/q18.xq (+7/-7)
test/rbkt/Queries/zorba/windowing/q18s.xq (+14/-0)
test/rbkt/Queries/zorba/windowing/q19.xq (+16/-20)
test/rbkt/Queries/zorba/windowing/q19s.xq (+24/-0)
test/rbkt/Queries/zorba/windowing/q1s.xq (+15/-0)
test/rbkt/Queries/zorba/windowing/q2.xq (+4/-4)
test/rbkt/Queries/zorba/windowing/q2s.xq (+15/-0)
test/rbkt/Queries/zorba/windowing/q3s.xq (+13/-0)
test/rbkt/Queries/zorba/windowing/q4s.xq (+13/-0)
test/rbkt/Queries/zorba/windowing/q5.xq (+3/-2)
test/rbkt/Queries/zorba/windowing/q5s.xq (+13/-0)
test/rbkt/Queries/zorba/windowing/q6.xq (+1/-1)
test/rbkt/Queries/zorba/windowing/q6s.xq (+11/-0)
test/rbkt/Queries/zorba/windowing/q7.xq (+6/-6)
test/rbkt/Queries/zorba/windowing/q7s.xq (+15/-0)
test/rbkt/Queries/zorba/windowing/q8.xq (+6/-7)
test/rbkt/Queries/zorba/windowing/q8s.xq (+15/-0)
test/rbkt/Queries/zorba/windowing/q9.xq (+3/-2)
test/rbkt/Queries/zorba/windowing/q9s.xq (+19/-0)
test/rbkt/Queries/zorba/windowing/rss.xml (+1/-1)
test/rbkt/Queries/zorba/windowing/rss.xsd (+29/-0)
test/rbkt/Queries/zorba/windowing/temp_events.xml (+3/-3)
test/rbkt/Queries/zorba/windowing/temp_events.xsd (+14/-0)
test/rbkt/Queries/zorba/windowing/term_def_list.xml (+1/-1)
test/rbkt/Queries/zorba/windowing/term_def_list.xsd (+12/-0)
To merge this branch: bzr merge lp:~zorba-coders/zorba/windowing-tests
Reviewer Review Type Date Requested Status
Chris Hillery Disapprove
Matthias Brantner Pending
Till Westmann Pending
Review via email: mp+97135@code.launchpad.net

Commit message

adapted tests to latest version of the use case document

Description of the change

adapted tests to latest version of the use case document

To post a comment you must log in.
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

Validation queue job windowing-tests-2012-03-13T03-03-11.597Z is finished. The final status was:

All tests succeeded!

Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

Voting does not meet specified criteria. Required: Approve > 1, Disapprove < 1, Needs Fixing < 1, Pending < 1. Got: 1 Pending.

Revision history for this message
Chris Hillery (ceejatec) wrote :

Stale, and should not be necessary when we run FOTS on the RQ.

review: Disapprove

Unmerged revisions

10718. By Matthias Brantner

adapted windowing tests to latest use case document + added one test for each use case which expects the input to be typed

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added file 'test/rbkt/ExpQueryResults/zorba/windowing/q10s.xml.res'
2--- test/rbkt/ExpQueryResults/zorba/windowing/q10s.xml.res 1970-01-01 00:00:00 +0000
3+++ test/rbkt/ExpQueryResults/zorba/windowing/q10s.xml.res 2012-03-13 03:02:21 +0000
4@@ -0,0 +1,2 @@
5+<?xml version="1.0" encoding="UTF-8"?>
6+<result><alert date="2006-01-02Z">Barbara did not come to work</alert></result>
7\ No newline at end of file
8
9=== added file 'test/rbkt/ExpQueryResults/zorba/windowing/q11s.xml.res'
10--- test/rbkt/ExpQueryResults/zorba/windowing/q11s.xml.res 1970-01-01 00:00:00 +0000
11+++ test/rbkt/ExpQueryResults/zorba/windowing/q11s.xml.res 2012-03-13 03:02:21 +0000
12@@ -0,0 +1,2 @@
13+<?xml version="1.0" encoding="UTF-8"?>
14+<results><result time="2006-01-01T11:15:00Z">Barbara</result><result time="2006-01-02T12:00:00Z"/><result time="2006-01-02T12:15:00Z">Clara</result><result time="2006-01-02T12:25:00Z">Clara</result><result time="2006-01-02T14:00:00Z"/></results>
15\ No newline at end of file
16
17=== modified file 'test/rbkt/ExpQueryResults/zorba/windowing/q12.xml.res'
18--- test/rbkt/ExpQueryResults/zorba/windowing/q12.xml.res 2011-01-24 11:43:14 +0000
19+++ test/rbkt/ExpQueryResults/zorba/windowing/q12.xml.res 2012-03-13 03:02:21 +0000
20@@ -1,1 +1,1 @@
21-<result><alert date="2006-01-01T11:15:00Z">Anton and Barbara just arrived</alert></result>
22+<result><alert time="2006-01-01T11:15:00Z">Anton and Barbara just arrived</alert></result>
23
24=== added file 'test/rbkt/ExpQueryResults/zorba/windowing/q12s.xml.res'
25--- test/rbkt/ExpQueryResults/zorba/windowing/q12s.xml.res 1970-01-01 00:00:00 +0000
26+++ test/rbkt/ExpQueryResults/zorba/windowing/q12s.xml.res 2012-03-13 03:02:21 +0000
27@@ -0,0 +1,2 @@
28+<?xml version="1.0" encoding="UTF-8"?>
29+<result><alert time="2006-01-01T11:15:00Z">Anton and Barbara just arrived</alert></result>
30\ No newline at end of file
31
32=== added file 'test/rbkt/ExpQueryResults/zorba/windowing/q13s.xml.res'
33--- test/rbkt/ExpQueryResults/zorba/windowing/q13s.xml.res 1970-01-01 00:00:00 +0000
34+++ test/rbkt/ExpQueryResults/zorba/windowing/q13s.xml.res 2012-03-13 03:02:21 +0000
35@@ -0,0 +1,2 @@
36+<?xml version="1.0" encoding="UTF-8"?>
37+<result><alert time="2006-01-02T14:00:00Z">Clara is suspicious</alert></result>
38\ No newline at end of file
39
40=== modified file 'test/rbkt/ExpQueryResults/zorba/windowing/q14.xml.res'
41--- test/rbkt/ExpQueryResults/zorba/windowing/q14.xml.res 2011-01-24 11:43:14 +0000
42+++ test/rbkt/ExpQueryResults/zorba/windowing/q14.xml.res 2012-03-13 03:02:21 +0000
43@@ -1,1 +1,1 @@
44-<result><annoying-author><author xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">rokas@e-mail.de</author></annoying-author></result>
45+<result><annoying-author><author>rokas@e-mail.de</author></annoying-author></result>
46
47=== added file 'test/rbkt/ExpQueryResults/zorba/windowing/q14s.xml.res'
48--- test/rbkt/ExpQueryResults/zorba/windowing/q14s.xml.res 1970-01-01 00:00:00 +0000
49+++ test/rbkt/ExpQueryResults/zorba/windowing/q14s.xml.res 2012-03-13 03:02:21 +0000
50@@ -0,0 +1,2 @@
51+<?xml version="1.0" encoding="UTF-8"?>
52+<result><annoying-author><author>rokas@e-mail.de</author></annoying-author></result>
53\ No newline at end of file
54
55=== modified file 'test/rbkt/ExpQueryResults/zorba/windowing/q15.xml.res'
56--- test/rbkt/ExpQueryResults/zorba/windowing/q15.xml.res 2011-01-24 11:43:14 +0000
57+++ test/rbkt/ExpQueryResults/zorba/windowing/q15.xml.res 2012-03-13 03:02:21 +0000
58@@ -1,1 +1,1 @@
59-<result><item><date>2003-06-03</date><title xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">Extending XQuery with Window Functions</title><title xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">XQueryP: A new programming language is born</title></item><item><date>2003-06-04</date></item></result>
60+<result><item><date>2003-06-03</date><title>Extending XQuery with Window Functions</title><title>XQueryP: A new programming language is born</title></item><item><date>2003-06-04</date></item></result>
61
62=== added file 'test/rbkt/ExpQueryResults/zorba/windowing/q15s.xml.res'
63--- test/rbkt/ExpQueryResults/zorba/windowing/q15s.xml.res 1970-01-01 00:00:00 +0000
64+++ test/rbkt/ExpQueryResults/zorba/windowing/q15s.xml.res 2012-03-13 03:02:21 +0000
65@@ -0,0 +1,2 @@
66+<?xml version="1.0" encoding="UTF-8"?>
67+<result><item><date>2003-06-03</date><title>Extending XQuery with Window Functions</title><title>XQueryP: A new programming language is born</title></item><item><date>2003-06-04</date></item></result>
68\ No newline at end of file
69
70=== modified file 'test/rbkt/ExpQueryResults/zorba/windowing/q16.xml.res'
71--- test/rbkt/ExpQueryResults/zorba/windowing/q16.xml.res 2011-01-24 11:43:14 +0000
72+++ test/rbkt/ExpQueryResults/zorba/windowing/q16.xml.res 2012-03-13 03:02:21 +0000
73@@ -1,1 +1,1 @@
74-<result><item><date>2003-06-03</date><author name="rokas@e-mail.de"><titles><title xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">Why use cases are important Part 1.</title><title xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">Why use cases are important Part 2.</title><title xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">Why use cases are important Part 3.</title></titles></author><author name="tim@e-mail.de"><titles><title xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">Extending XQuery with Window Functions</title></titles></author><author name="david@e-mail.de"><titles><title xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">XQueryP: A new programming language is born</title></titles></author></item><item><date>2003-06-04</date><author name="rokas@e-mail.de"><titles><title xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">Why use cases are annoying to write.</title></titles></author></item></result>
75+<result><item><date>2003-06-03</date><author name="rokas@e-mail.de"><titles><title>Why use cases are important Part 1.</title><title>Why use cases are important Part 2.</title><title>Why use cases are important Part 3.</title></titles></author><author name="tim@e-mail.de"><titles><title>Extending XQuery with Window Functions</title></titles></author><author name="david@e-mail.de"><titles><title>XQueryP: A new programming language is born</title></titles></author></item><item><date>2003-06-04</date><author name="rokas@e-mail.de"><titles><title>Why use cases are annoying to write.</title></titles></author></item></result>
76
77=== added file 'test/rbkt/ExpQueryResults/zorba/windowing/q16s.xml.res'
78--- test/rbkt/ExpQueryResults/zorba/windowing/q16s.xml.res 1970-01-01 00:00:00 +0000
79+++ test/rbkt/ExpQueryResults/zorba/windowing/q16s.xml.res 2012-03-13 03:02:21 +0000
80@@ -0,0 +1,2 @@
81+<?xml version="1.0" encoding="UTF-8"?>
82+<result><item><date>2003-06-03</date><author name="rokas@e-mail.de"><titles><title>Why use cases are important Part 1.</title><title>Why use cases are important Part 2.</title><title>Why use cases are important Part 3.</title></titles></author><author name="tim@e-mail.de"><titles><title>Extending XQuery with Window Functions</title></titles></author><author name="david@e-mail.de"><titles><title>XQueryP: A new programming language is born</title></titles></author></item><item><date>2003-06-04</date><author name="rokas@e-mail.de"><titles><title>Why use cases are annoying to write.</title></titles></author></item></result>
83\ No newline at end of file
84
85=== added file 'test/rbkt/ExpQueryResults/zorba/windowing/q17s.xml.res'
86--- test/rbkt/ExpQueryResults/zorba/windowing/q17s.xml.res 1970-01-01 00:00:00 +0000
87+++ test/rbkt/ExpQueryResults/zorba/windowing/q17s.xml.res 2012-03-13 03:02:21 +0000
88@@ -0,0 +1,2 @@
89+<?xml version="1.0" encoding="UTF-8"?>
90+<result><mostValuableCustomer endOfDay="2006-01-01T00:00:00Z"><amount company="ACME1">1100</amount></mostValuableCustomer><mostValuableCustomer endOfDay="2006-01-02T00:00:00Z"><amount company="ACME1">10000</amount></mostValuableCustomer><mostValuableCustomer endOfDay="2006-01-03T00:00:00Z"/><mostValuableCustomer endOfDay="2006-01-04T00:00:00Z"/><mostValuableCustomer endOfDay="2006-01-05T00:00:00Z"/><mostValuableCustomer endOfDay="2006-01-06T00:00:00Z"><amount company="ACME2">100</amount></mostValuableCustomer><mostValuableCustomer endOfDay="2006-01-07T00:00:00Z"/></result>
91\ No newline at end of file
92
93=== added file 'test/rbkt/ExpQueryResults/zorba/windowing/q18s.xml.res'
94--- test/rbkt/ExpQueryResults/zorba/windowing/q18s.xml.res 1970-01-01 00:00:00 +0000
95+++ test/rbkt/ExpQueryResults/zorba/windowing/q18s.xml.res 2012-03-13 03:02:21 +0000
96@@ -0,0 +1,2 @@
97+<?xml version="1.0" encoding="UTF-8"?>
98+<result><timeToShip orderID="OID01">P3DT22H</timeToShip><timeToShip orderID="OID03">P2DT19H</timeToShip></result>
99\ No newline at end of file
100
101=== modified file 'test/rbkt/ExpQueryResults/zorba/windowing/q19.xml.res'
102--- test/rbkt/ExpQueryResults/zorba/windowing/q19.xml.res 2011-01-25 10:11:46 +0000
103+++ test/rbkt/ExpQueryResults/zorba/windowing/q19.xml.res 2012-03-13 03:02:21 +0000
104@@ -1,12 +1,1 @@
105-<result>
106- <bundleWith orderId="OID01">
107- <OrderRequest xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
108- billTo="ACME1"
109- date="2006-01-02T14:00:00-00:00"
110- orderID="OID03" shipTo="ACME1" total="10000" type="new">
111- <Item partID="ID3" quantity="100" unitPrice="100"/>
112- </OrderRequest>
113- </bundleWith>
114- <bundleWith orderId="OID02"/>
115- <bundleWith orderId="OID03"/>
116-</result>
117+<result><bundleWith orderId="OID01"><OrderRequest billTo="ACME1" date="2006-01-02T14:00:00-00:00" orderID="OID03" shipTo="ACME1" total="10000" type="new"><Item partID="ID3" quantity="100" unitPrice="100"></Item></OrderRequest></bundleWith></result>
118
119=== added file 'test/rbkt/ExpQueryResults/zorba/windowing/q19s.xml.res'
120--- test/rbkt/ExpQueryResults/zorba/windowing/q19s.xml.res 1970-01-01 00:00:00 +0000
121+++ test/rbkt/ExpQueryResults/zorba/windowing/q19s.xml.res 2012-03-13 03:02:21 +0000
122@@ -0,0 +1,2 @@
123+<?xml version="1.0" encoding="UTF-8"?>
124+<result><bundleWith orderId="OID01"><OrderRequest billTo="ACME1" date="2006-01-02T14:00:00Z" orderID="OID03" shipTo="ACME1" total="10000" type="new"><Item partID="ID3" quantity="100" unitPrice="100"/></OrderRequest></bundleWith></result>
125\ No newline at end of file
126
127=== added file 'test/rbkt/ExpQueryResults/zorba/windowing/q1s.xml.res'
128--- test/rbkt/ExpQueryResults/zorba/windowing/q1s.xml.res 1970-01-01 00:00:00 +0000
129+++ test/rbkt/ExpQueryResults/zorba/windowing/q1s.xml.res 2012-03-13 03:02:21 +0000
130@@ -0,0 +1,1 @@
131+<table><tr><td>Green</td><td>Pink</td><td>Lilac</td></tr><tr><td>Turquoise</td><td>Peach</td><td>Opal</td></tr><tr><td>Champagne</td></tr></table>
132
133=== added file 'test/rbkt/ExpQueryResults/zorba/windowing/q2s.xml.res'
134--- test/rbkt/ExpQueryResults/zorba/windowing/q2s.xml.res 1970-01-01 00:00:00 +0000
135+++ test/rbkt/ExpQueryResults/zorba/windowing/q2s.xml.res 2012-03-13 03:02:21 +0000
136@@ -0,0 +1,2 @@
137+<?xml version="1.0" encoding="UTF-8"?>
138+<chapter><section title="heading1"><para>para1</para><para>para2</para></section><section title="heading2"><para>para3</para><para>para4</para><para>para5</para></section></chapter>
139\ No newline at end of file
140
141=== modified file 'test/rbkt/ExpQueryResults/zorba/windowing/q3.xml.res'
142--- test/rbkt/ExpQueryResults/zorba/windowing/q3.xml.res 2011-01-24 11:43:14 +0000
143+++ test/rbkt/ExpQueryResults/zorba/windowing/q3.xml.res 2012-03-13 03:02:21 +0000
144@@ -1,1 +1,1 @@
145-<doc><term><dt xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">XML</dt><dd xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">Extensible Markup Language</dd></term><term><dt xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">XSLT</dt><dt xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">XSL Transformations</dt><dd xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">A language for transforming XML</dd><dd xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">A specification produced by W3C</dd></term></doc>
146+<doc><term><dt>XML</dt><dd>Extensible Markup Language</dd></term><term><dt>XSLT</dt><dt>XSL Transformations</dt><dd>A language for transforming XML</dd><dd>A specification produced by W3C</dd></term></doc>
147
148=== added file 'test/rbkt/ExpQueryResults/zorba/windowing/q3s.xml.res'
149--- test/rbkt/ExpQueryResults/zorba/windowing/q3s.xml.res 1970-01-01 00:00:00 +0000
150+++ test/rbkt/ExpQueryResults/zorba/windowing/q3s.xml.res 2012-03-13 03:02:21 +0000
151@@ -0,0 +1,2 @@
152+<?xml version="1.0" encoding="UTF-8"?>
153+<doc><term><dt>XML</dt><dd>Extensible Markup Language</dd></term><term><dt>XSLT</dt><dt>XSL Transformations</dt><dd>A language for transforming XML</dd><dd>A specification produced by W3C</dd></term></doc>
154\ No newline at end of file
155
156=== modified file 'test/rbkt/ExpQueryResults/zorba/windowing/q4.xml.res'
157--- test/rbkt/ExpQueryResults/zorba/windowing/q4.xml.res 2011-01-24 11:43:14 +0000
158+++ test/rbkt/ExpQueryResults/zorba/windowing/q4.xml.res 2012-03-13 03:02:21 +0000
159@@ -1,1 +1,1 @@
160-8 9 17.333333333333332 18.666666666666668
161+8 9 17 18
162
163=== added file 'test/rbkt/ExpQueryResults/zorba/windowing/q4s.xml.res'
164--- test/rbkt/ExpQueryResults/zorba/windowing/q4s.xml.res 1970-01-01 00:00:00 +0000
165+++ test/rbkt/ExpQueryResults/zorba/windowing/q4s.xml.res 2012-03-13 03:02:21 +0000
166@@ -0,0 +1,2 @@
167+<?xml version="1.0" encoding="UTF-8"?>
168+8 9 17 18
169\ No newline at end of file
170
171=== modified file 'test/rbkt/ExpQueryResults/zorba/windowing/q5.xml.res'
172--- test/rbkt/ExpQueryResults/zorba/windowing/q5.xml.res 2011-01-24 11:43:14 +0000
173+++ test/rbkt/ExpQueryResults/zorba/windowing/q5.xml.res 2012-03-13 03:02:21 +0000
174@@ -1,1 +1,1 @@
175-8.88 8.68 12.52 15.6 24.72
176+8.88 8.68 12.32 15.24 23.92
177
178=== added file 'test/rbkt/ExpQueryResults/zorba/windowing/q5s.xml.res'
179--- test/rbkt/ExpQueryResults/zorba/windowing/q5s.xml.res 1970-01-01 00:00:00 +0000
180+++ test/rbkt/ExpQueryResults/zorba/windowing/q5s.xml.res 2012-03-13 03:02:21 +0000
181@@ -0,0 +1,2 @@
182+<?xml version="1.0" encoding="UTF-8"?>
183+8.88 8.68 12.32 15.24 23.92
184\ No newline at end of file
185
186=== added file 'test/rbkt/ExpQueryResults/zorba/windowing/q6s.xml.res'
187--- test/rbkt/ExpQueryResults/zorba/windowing/q6s.xml.res 1970-01-01 00:00:00 +0000
188+++ test/rbkt/ExpQueryResults/zorba/windowing/q6s.xml.res 2012-03-13 03:02:21 +0000
189@@ -0,0 +1,2 @@
190+<?xml version="1.0" encoding="UTF-8"?>
191+<alarm>Outlier detected. Event id:5</alarm>
192\ No newline at end of file
193
194=== added file 'test/rbkt/ExpQueryResults/zorba/windowing/q7s.xml.res'
195--- test/rbkt/ExpQueryResults/zorba/windowing/q7s.xml.res 1970-01-01 00:00:00 +0000
196+++ test/rbkt/ExpQueryResults/zorba/windowing/q7s.xml.res 2012-03-13 03:02:21 +0000
197@@ -0,0 +1,2 @@
198+<?xml version="1.0" encoding="UTF-8"?>
199+<result><warning time="2006-01-01T11:00:00Z">Barbara: Anton arrived 1h ago</warning></result>
200\ No newline at end of file
201
202=== modified file 'test/rbkt/ExpQueryResults/zorba/windowing/q8.xml.res'
203--- test/rbkt/ExpQueryResults/zorba/windowing/q8.xml.res 2011-01-26 08:09:43 +0000
204+++ test/rbkt/ExpQueryResults/zorba/windowing/q8.xml.res 2012-03-13 03:02:21 +0000
205@@ -1,10 +1,1 @@
206-<result>
207-<working-time><person xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">Anton</person><time>PT4H30M</time></working-time>
208-<working-time><person xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">Barbara</person><time>PT3H</time></working-time>
209-<working-time><person xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">Clara</person><time>PT1H</time></working-time>
210-<working-time><person xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">Anton</person><time>PT5H</time></working-time>
211-<working-time><person xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">Clara</person><time>PT10M</time></working-time>
212-<working-time><person xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">Clara</person><time>PT5M</time></working-time>
213-<working-time><person xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">Clara</person><time>PT15M</time></working-time>
214-<working-time><person xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">Clara</person><time>PT2H15M</time></working-time>
215-</result>
216+<result><working-time><person>Anton</person><time>PT4H30M</time></working-time><working-time><person>Barbara</person><time>PT3H</time></working-time><working-time><person>Clara</person><time>PT1H</time></working-time><working-time><person>Anton</person><time>PT5H</time></working-time><working-time><person>Clara</person><time>PT10M</time></working-time><working-time><person>Clara</person><time>PT5M</time></working-time><working-time><person>Clara</person><time>PT15M</time></working-time><working-time><person>Clara</person><time>PT2H15M</time></working-time></result>
217
218=== added file 'test/rbkt/ExpQueryResults/zorba/windowing/q8s.xml.res'
219--- test/rbkt/ExpQueryResults/zorba/windowing/q8s.xml.res 1970-01-01 00:00:00 +0000
220+++ test/rbkt/ExpQueryResults/zorba/windowing/q8s.xml.res 2012-03-13 03:02:21 +0000
221@@ -0,0 +1,2 @@
222+<?xml version="1.0" encoding="UTF-8"?>
223+<result><working-time><person>Anton</person><time>PT4H30M</time></working-time><working-time><person>Barbara</person><time>PT3H</time></working-time><working-time><person>Clara</person><time>PT1H</time></working-time><working-time><person>Anton</person><time>PT5H</time></working-time><working-time><person>Clara</person><time>PT10M</time></working-time><working-time><person>Clara</person><time>PT5M</time></working-time><working-time><person>Clara</person><time>PT15M</time></working-time><working-time><person>Clara</person><time>PT2H15M</time></working-time></result>
224\ No newline at end of file
225
226=== modified file 'test/rbkt/ExpQueryResults/zorba/windowing/q9.xml.res'
227--- test/rbkt/ExpQueryResults/zorba/windowing/q9.xml.res 2011-01-24 11:43:14 +0000
228+++ test/rbkt/ExpQueryResults/zorba/windowing/q9.xml.res 2012-03-13 03:02:21 +0000
229@@ -1,1 +1,1 @@
230-<result><working-time><person xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">Barbara</person><time>PT3H</time></working-time><working-time><person xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">Clara</person><time>PT3H45M</time></working-time><working-time><person xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">Anton</person><time>PT9H30M</time></working-time></result>
231+<result><working-time><person>Barbara</person><time>PT3H</time></working-time><working-time><person>Clara</person><time>PT3H45M</time></working-time><working-time><person>Anton</person><time>PT9H30M</time></working-time></result>
232
233=== added file 'test/rbkt/ExpQueryResults/zorba/windowing/q9s.xml.res'
234--- test/rbkt/ExpQueryResults/zorba/windowing/q9s.xml.res 1970-01-01 00:00:00 +0000
235+++ test/rbkt/ExpQueryResults/zorba/windowing/q9s.xml.res 2012-03-13 03:02:21 +0000
236@@ -0,0 +1,2 @@
237+<?xml version="1.0" encoding="UTF-8"?>
238+<result><working-time>Anton<time>PT9H30M</time></working-time><working-time>Barbara<time>PT3H</time></working-time><working-time>Clara<time>PT3H45M</time></working-time></result>
239
240=== modified file 'test/rbkt/Queries/CMakeLists.txt'
241--- test/rbkt/Queries/CMakeLists.txt 2012-03-07 15:49:25 +0000
242+++ test/rbkt/Queries/CMakeLists.txt 2012-03-13 03:02:21 +0000
243@@ -546,3 +546,6 @@
244 EXPECTED_FAILURE(test/rbkt/zorba/windowing/tumbling21 899364)
245
246
247+# failing tests due to old group by syntax + semantics
248+EXPECTED_FAILURE(test/rbkt/zorba/windowing/q9 924055)
249+EXPECTED_FAILURE(test/rbkt/zorba/windowing/q9s 924055)
250
251=== modified file 'test/rbkt/Queries/zorba/windowing/arrange_rows.xml'
252--- test/rbkt/Queries/zorba/windowing/arrange_rows.xml 2011-01-24 11:43:14 +0000
253+++ test/rbkt/Queries/zorba/windowing/arrange_rows.xml 2012-03-13 03:02:21 +0000
254@@ -1,4 +1,4 @@
255-<doc xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="arrange_rows.xsd">
256+<doc>
257 <data>Green</data>
258 <data>Pink</data>
259 <data>Lilac</data>
260
261=== added file 'test/rbkt/Queries/zorba/windowing/arrange_rows.xsd'
262--- test/rbkt/Queries/zorba/windowing/arrange_rows.xsd 1970-01-01 00:00:00 +0000
263+++ test/rbkt/Queries/zorba/windowing/arrange_rows.xsd 2012-03-13 03:02:21 +0000
264@@ -0,0 +1,9 @@
265+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
266+ <xs:element name="doc">
267+ <xs:complexType>
268+ <xs:sequence>
269+ <xs:element name="data" type="xs:string" maxOccurs="unbounded"/>
270+ </xs:sequence>
271+ </xs:complexType>
272+ </xs:element>
273+</xs:schema>
274
275=== modified file 'test/rbkt/Queries/zorba/windowing/cxml.xml'
276--- test/rbkt/Queries/zorba/windowing/cxml.xml 2011-01-24 11:43:14 +0000
277+++ test/rbkt/Queries/zorba/windowing/cxml.xml 2012-03-13 03:02:21 +0000
278@@ -1,4 +1,4 @@
279-<sequence xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="cxml.xsd">
280+<sequence>
281 <time date="2006-01-01T00:00:00-00:00"/>
282 <OrderRequest billTo="ACME1" date="2006-01-01T10:00:00-00:00"
283 orderID="OID01" shipTo="ACME1" total="1100" type="new">
284
285=== added file 'test/rbkt/Queries/zorba/windowing/cxml.xsd'
286--- test/rbkt/Queries/zorba/windowing/cxml.xsd 1970-01-01 00:00:00 +0000
287+++ test/rbkt/Queries/zorba/windowing/cxml.xsd 2012-03-13 03:02:21 +0000
288@@ -0,0 +1,44 @@
289+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
290+ <xs:element name="sequence">
291+ <xs:complexType>
292+ <xs:sequence>
293+ <xs:choice maxOccurs="unbounded">
294+ <xs:element name="time" type="TimeEvent"/>
295+ <xs:element name="OrderRequest" type="OrderRequest" maxOccurs="unbounded"/>
296+ <xs:element name="ConfirmationRequest" type="ConfirmationRequest"/>
297+ <xs:element name="ShipNotice" type="ShipNotice" maxOccurs="unbounded"/>
298+ </xs:choice>
299+ </xs:sequence>
300+ </xs:complexType>
301+ </xs:element>
302+ <xs:complexType name="TimeEvent">
303+ <xs:attribute name="date" type="xs:dateTime" use="required"/>
304+ </xs:complexType>
305+ <xs:complexType name="OrderRequest">
306+ <xs:sequence>
307+ <xs:element name="Item" maxOccurs="unbounded">
308+ <xs:complexType>
309+ <xs:attribute name="unitPrice" type="xs:byte" use="required"/>
310+ <xs:attribute name="quantity" type="xs:byte" use="required"/>
311+ <xs:attribute name="partID" type="xs:string" use="required"/>
312+ </xs:complexType>
313+ </xs:element>
314+ </xs:sequence>
315+ <xs:attribute name="type" type="xs:string" use="required"/>
316+ <xs:attribute name="total" type="xs:short" use="required"/>
317+ <xs:attribute name="shipTo" type="xs:string"/>
318+ <xs:attribute name="orderID" type="xs:string" use="required"/>
319+ <xs:attribute name="date" type="xs:dateTime" use="required"/>
320+ <xs:attribute name="billTo" type="xs:string" use="required"/>
321+ </xs:complexType>
322+ <xs:complexType name="ConfirmationRequest">
323+ <xs:attribute name="status" type="xs:string" use="required"/>
324+ <xs:attribute name="orderID" type="xs:string" use="required"/>
325+ <xs:attribute name="date" type="xs:dateTime" use="required"/>
326+ <xs:attribute name="confirmID" type="xs:string" use="required"/>
327+ </xs:complexType>
328+ <xs:complexType name="ShipNotice">
329+ <xs:attribute name="orderID" type="xs:string" use="required"/>
330+ <xs:attribute name="date" type="xs:dateTime" use="required"/>
331+ </xs:complexType>
332+</xs:schema>
333
334=== added file 'test/rbkt/Queries/zorba/windowing/head_para.xsd'
335--- test/rbkt/Queries/zorba/windowing/head_para.xsd 1970-01-01 00:00:00 +0000
336+++ test/rbkt/Queries/zorba/windowing/head_para.xsd 2012-03-13 03:02:21 +0000
337@@ -0,0 +1,12 @@
338+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
339+ <xs:element name="body">
340+ <xs:complexType>
341+ <xs:sequence>
342+ <xs:sequence maxOccurs="unbounded">
343+ <xs:element name="h2" type="xs:string"/>
344+ <xs:element name="p" type="xs:string" maxOccurs="unbounded"/>
345+ </xs:sequence>
346+ </xs:sequence>
347+ </xs:complexType>
348+ </xs:element>
349+</xs:schema>
350
351=== modified file 'test/rbkt/Queries/zorba/windowing/person_events.xml'
352--- test/rbkt/Queries/zorba/windowing/person_events.xml 2011-01-24 11:43:14 +0000
353+++ test/rbkt/Queries/zorba/windowing/person_events.xml 2012-03-13 03:02:21 +0000
354@@ -1,5 +1,4 @@
355-<?xml version="1.0" encoding="UTF-8"?>
356-<stream xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="person_events.xsd">
357+<stream>
358 <event time="2006-01-01T01:00:00-00:00"/>
359 <event time="2006-01-01T10:30:00-00:00">
360 <person>Anton</person>
361
362=== added file 'test/rbkt/Queries/zorba/windowing/person_events.xsd'
363--- test/rbkt/Queries/zorba/windowing/person_events.xsd 1970-01-01 00:00:00 +0000
364+++ test/rbkt/Queries/zorba/windowing/person_events.xsd 2012-03-13 03:02:21 +0000
365@@ -0,0 +1,17 @@
366+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
367+ <xs:element name="stream">
368+ <xs:complexType>
369+ <xs:sequence>
370+ <xs:element name="event" maxOccurs="unbounded">
371+ <xs:complexType>
372+ <xs:sequence minOccurs="0">
373+ <xs:element name="person" type="xs:string"/>
374+ <xs:element name="direction" type="xs:string"/>
375+ </xs:sequence>
376+ <xs:attribute name="time" type="xs:dateTime" use="required"/>
377+ </xs:complexType>
378+ </xs:element>
379+ </xs:sequence>
380+ </xs:complexType>
381+ </xs:element>
382+</xs:schema>
383
384=== modified file 'test/rbkt/Queries/zorba/windowing/q1.xq'
385--- test/rbkt/Queries/zorba/windowing/q1.xq 2011-01-24 11:43:14 +0000
386+++ test/rbkt/Queries/zorba/windowing/q1.xq 2012-03-13 03:02:21 +0000
387@@ -2,7 +2,7 @@
388
389 <table>{
390 for tumbling window $w in $seq/doc/*
391- start at $x when fn:true()
392+ start at $x when fn:true()
393 end at $y when $y - $x = 2
394 return
395 <tr>{
396
397=== modified file 'test/rbkt/Queries/zorba/windowing/q10.xq'
398--- test/rbkt/Queries/zorba/windowing/q10.xq 2011-01-24 11:43:14 +0000
399+++ test/rbkt/Queries/zorba/windowing/q10.xq 2012-03-13 03:02:21 +0000
400@@ -2,8 +2,8 @@
401
402 <result>{
403 for tumbling window $w in $seq/stream/event[direction eq "in"]
404- start $s when fn:true()
405- end next $e when xs:date( xs:dateTime($s/@time) ) ne xs:date( xs:dateTime($e/@time) )
406+ start $s when fn:true()
407+ end next $e when xs:date( xs:dateTime($s/@time) ) ne xs:date( xs:dateTime($e/@time) )
408 let $date := xs:date(xs:dateTime($s/@time))
409 where not($w[person eq "Barbara"])
410 return <alert date="{ $date }">Barbara did not come to work</alert>
411
412=== added file 'test/rbkt/Queries/zorba/windowing/q10s.xq'
413--- test/rbkt/Queries/zorba/windowing/q10s.xq 1970-01-01 00:00:00 +0000
414+++ test/rbkt/Queries/zorba/windowing/q10s.xq 2012-03-13 03:02:21 +0000
415@@ -0,0 +1,12 @@
416+import schema default element namespace "" at "person_events.xsd";
417+
418+declare variable $seq := validate { fn:doc("person_events.xml") };
419+
420+<result>{
421+ for tumbling window $w in $seq/stream/event[direction eq "in"]
422+ start $s when fn:true()
423+ end next $e when xs:date( xs:dateTime($s/@time) ) ne xs:date( xs:dateTime($e/@time) )
424+ let $date := xs:date(xs:dateTime($s/@time))
425+ where not($w[person eq "Barbara"])
426+ return <alert date="{ $date }">Barbara did not come to work</alert>
427+}</result>
428
429=== modified file 'test/rbkt/Queries/zorba/windowing/q11.xq'
430--- test/rbkt/Queries/zorba/windowing/q11.xq 2011-01-24 11:43:14 +0000
431+++ test/rbkt/Queries/zorba/windowing/q11.xq 2012-03-13 03:02:21 +0000
432@@ -4,9 +4,9 @@
433 for tumbling window $w in $seq/stream/event[direction eq "in"]
434 start when true()
435 only end next $x when $x/person eq "Clara"
436- return
437+ return
438 <result time="{ $x/@time }">{
439- distinct-values(for $y in $w
440+ distinct-values(for $y in $w
441 where (xs:dateTime($y/@time) + xs:dayTimeDuration("PT15M") ) ge xs:dateTime($x/@time)
442 return $y/person)
443 }</result>
444
445=== added file 'test/rbkt/Queries/zorba/windowing/q11s.xq'
446--- test/rbkt/Queries/zorba/windowing/q11s.xq 1970-01-01 00:00:00 +0000
447+++ test/rbkt/Queries/zorba/windowing/q11s.xq 2012-03-13 03:02:21 +0000
448@@ -0,0 +1,15 @@
449+import schema default element namespace "" at "person_events.xsd";
450+
451+declare variable $seq := validate { fn:doc("person_events.xml") };
452+
453+<results>{
454+ for tumbling window $w in $seq/stream/event[direction eq "in"]
455+ start when true()
456+ only end next $x when $x/person eq "Clara"
457+ return
458+ <result time="{ $x/@time }">{
459+ distinct-values(for $y in $w
460+ where (xs:dateTime($y/@time) + xs:dayTimeDuration("PT15M") ) ge xs:dateTime($x/@time)
461+ return $y/person)
462+ }</result>
463+}</results>
464
465=== modified file 'test/rbkt/Queries/zorba/windowing/q12.xq'
466--- test/rbkt/Queries/zorba/windowing/q12.xq 2011-01-26 08:09:43 +0000
467+++ test/rbkt/Queries/zorba/windowing/q12.xq 2012-03-13 03:02:21 +0000
468@@ -1,12 +1,10 @@
469 declare variable $seq := fn:doc("person_events.xml");
470
471-<result>
472-{
473- for tumbling window $w in $seq/stream/event[direction eq "in"]
474- start $x when $x/person = ("Barbara", "Anton")
475- end next $y when xs:dateTime($y/@time) - xs:dateTime($x/@time) gt xs:dayTimeDuration("PT30M")
476- where $w[person eq "Anton"] and $w[person eq "Barbara"]
477- return
478- <alert date="{ xs:dateTime($y/@time) }">Anton and Barbara just arrived</alert>
479-}
480-</result>
481+<result>{
482+ for tumbling window $w in $seq/stream/event[direction eq "in"]
483+ start $x when $x/person = ("Barbara", "Anton")
484+ end next $y when xs:dateTime($y/@time) - xs:dateTime($x/@time) gt xs:dayTimeDuration("PT30M")
485+ where $w[person eq "Anton"] and $w[person eq "Barbara"]
486+ return
487+ <alert time="{ xs:dateTime($y/@time) }">Anton and Barbara just arrived</alert>
488+}</result>
489
490=== added file 'test/rbkt/Queries/zorba/windowing/q12s.xq'
491--- test/rbkt/Queries/zorba/windowing/q12s.xq 1970-01-01 00:00:00 +0000
492+++ test/rbkt/Queries/zorba/windowing/q12s.xq 2012-03-13 03:02:21 +0000
493@@ -0,0 +1,12 @@
494+import schema default element namespace "" at "person_events.xsd";
495+
496+declare variable $seq := validate { fn:doc("person_events.xml") };
497+
498+<result>{
499+ for tumbling window $w in $seq/stream/event[direction eq "in"]
500+ start $x when $x/person = ("Barbara", "Anton")
501+ end next $y when xs:dateTime($y/@time) - xs:dateTime($x/@time) gt xs:dayTimeDuration("PT30M")
502+ where $w[person eq "Anton"] and $w[person eq "Barbara"]
503+ return
504+ <alert time="{ xs:dateTime($y/@time) }">Anton and Barbara just arrived</alert>
505+}</result>
506
507=== modified file 'test/rbkt/Queries/zorba/windowing/q13.xq'
508--- test/rbkt/Queries/zorba/windowing/q13.xq 2011-01-24 11:43:14 +0000
509+++ test/rbkt/Queries/zorba/windowing/q13.xq 2012-03-13 03:02:21 +0000
510@@ -1,11 +1,11 @@
511 declare variable $seq := fn:doc("person_events.xml");
512
513 <result>{
514- for sliding window $w in $seq/stream/event
515- start $s when true()
516- end next $e when xs:dateTime($e/@time) - xs:dateTime($s/@time) gt
517+ for sliding window $w in $seq/stream/event
518+ start $s when true()
519+ end next $e when xs:dateTime($e/@time) - xs:dateTime($s/@time) gt
520 xs:dayTimeDuration("PT1H")
521 where count($w[person eq $s/person and direction eq "in"]) ge 3
522- return
523+ return
524 <alert time="{ $e/@time }">{fn:data($s/person)} is suspicious</alert>
525 }</result>
526
527=== added file 'test/rbkt/Queries/zorba/windowing/q13s.xq'
528--- test/rbkt/Queries/zorba/windowing/q13s.xq 1970-01-01 00:00:00 +0000
529+++ test/rbkt/Queries/zorba/windowing/q13s.xq 2012-03-13 03:02:21 +0000
530@@ -0,0 +1,13 @@
531+import schema default element namespace "" at "person_events.xsd";
532+
533+declare variable $seq := validate { fn:doc("person_events.xml") };
534+
535+<result>{
536+ for sliding window $w in $seq/stream/event
537+ start $s when true()
538+ end next $e when xs:dateTime($e/@time) - xs:dateTime($s/@time) gt
539+ xs:dayTimeDuration("PT1H")
540+ where count($w[person eq $s/person and direction eq "in"]) ge 3
541+ return
542+ <alert time="{ $e/@time }">{fn:data($s/person)} is suspicious</alert>
543+}</result>
544
545=== modified file 'test/rbkt/Queries/zorba/windowing/q14.xq'
546--- test/rbkt/Queries/zorba/windowing/q14.xq 2011-01-24 11:43:14 +0000
547+++ test/rbkt/Queries/zorba/windowing/q14.xq 2012-03-13 03:02:21 +0000
548@@ -1,7 +1,7 @@
549 declare variable $rssfeed := fn:doc("rss.xml");
550
551 <result>{
552- for tumbling window $w in $rssfeed/rss/channel/item
553+ for tumbling window $w in $rssfeed/rss/channel/item
554 start $first when fn:true()
555 end next $lookAhead when $first/author ne $lookAhead/author
556 where count($w) ge 3
557
558=== added file 'test/rbkt/Queries/zorba/windowing/q14s.xq'
559--- test/rbkt/Queries/zorba/windowing/q14s.xq 1970-01-01 00:00:00 +0000
560+++ test/rbkt/Queries/zorba/windowing/q14s.xq 2012-03-13 03:02:21 +0000
561@@ -0,0 +1,13 @@
562+import schema default element namespace "" at "rss.xsd";
563+
564+declare variable $rssfeed := validate { fn:doc("rss.xml") };
565+
566+<result>{
567+ for tumbling window $w in $rssfeed/rss/channel/item
568+ start $first when fn:true()
569+ end next $lookAhead when $first/author ne $lookAhead/author
570+ where count($w) ge 3
571+ return <annoying-author>{
572+ $w[1]/author
573+ }</annoying-author>
574+}</result>
575
576=== modified file 'test/rbkt/Queries/zorba/windowing/q15.xq'
577--- test/rbkt/Queries/zorba/windowing/q15.xq 2011-01-24 11:43:14 +0000
578+++ test/rbkt/Queries/zorba/windowing/q15.xq 2012-03-13 03:02:21 +0000
579@@ -1,16 +1,15 @@
580-
581 declare variable $rssfeed := fn:doc("rss.xml");
582
583 <result>{
584- for tumbling window $w in $rssfeed/rss/channel/item
585+ for tumbling window $w in $rssfeed/rss/channel/item
586 start $s_curr when true()
587- end next $e_next when
588- fn:day-from-dateTime(xs:dateTime($e_next/pubDate)) ne
589+ end next $e_next when
590+ fn:day-from-dateTime(xs:dateTime($e_next/pubDate)) ne
591 fn:day-from-dateTime(xs:dateTime($s_curr/pubDate))
592- return
593+ return
594 <item>
595 <date>{xs:date(xs:dateTime($s_curr/pubDate))}</date>
596- { for $item in $w
597+ { for $item in $w
598 where fn:contains( xs:string($item/title), 'XQuery')
599 return $item/title }
600 </item>
601
602=== added file 'test/rbkt/Queries/zorba/windowing/q15s.xq'
603--- test/rbkt/Queries/zorba/windowing/q15s.xq 1970-01-01 00:00:00 +0000
604+++ test/rbkt/Queries/zorba/windowing/q15s.xq 2012-03-13 03:02:21 +0000
605@@ -0,0 +1,18 @@
606+import schema default element namespace "" at "rss.xsd";
607+
608+declare variable $rssfeed := validate { fn:doc("rss.xml") };
609+
610+<result>{
611+ for tumbling window $w in $rssfeed/rss/channel/item
612+ start $s_curr when true()
613+ end next $e_next when
614+ fn:day-from-dateTime(xs:dateTime($e_next/pubDate)) ne
615+ fn:day-from-dateTime(xs:dateTime($s_curr/pubDate))
616+ return
617+ <item>
618+ <date>{xs:date(xs:dateTime($s_curr/pubDate))}</date>
619+ { for $item in $w
620+ where fn:contains( xs:string($item/title), 'XQuery')
621+ return $item/title }
622+ </item>
623+}</result>
624
625=== modified file 'test/rbkt/Queries/zorba/windowing/q16.xq'
626--- test/rbkt/Queries/zorba/windowing/q16.xq 2011-01-24 11:43:14 +0000
627+++ test/rbkt/Queries/zorba/windowing/q16.xq 2012-03-13 03:02:21 +0000
628@@ -1,16 +1,16 @@
629 declare variable $rssfeed := fn:doc("rss.xml");
630
631 <result>{
632- for tumbling window $w in $rssfeed/rss/channel/item
633+ for tumbling window $w in $rssfeed/rss/channel/item
634 start $s_curr when true()
635- end next $e_next when
636- fn:day-from-dateTime(xs:dateTime($e_next/pubDate)) ne
637+ end next $e_next when
638+ fn:day-from-dateTime(xs:dateTime($e_next/pubDate)) ne
639 fn:day-from-dateTime(xs:dateTime($s_curr/pubDate))
640- return
641+ return
642 <item>
643 <date>{xs:date(xs:dateTime($s_curr/pubDate))}</date>
644- { for $a in fn:distinct-values($w/author)
645- return
646+ { for $a in fn:distinct-values($w/author)
647+ return
648 <author name="{$a}">
649 <titles>
650 { $w[author eq $a]/title }
651
652=== added file 'test/rbkt/Queries/zorba/windowing/q16s.xq'
653--- test/rbkt/Queries/zorba/windowing/q16s.xq 1970-01-01 00:00:00 +0000
654+++ test/rbkt/Queries/zorba/windowing/q16s.xq 2012-03-13 03:02:21 +0000
655@@ -0,0 +1,23 @@
656+import schema default element namespace "" at "rss.xsd";
657+
658+declare variable $rssfeed := validate { fn:doc("rss.xml") };
659+
660+<result>{
661+ for tumbling window $w in $rssfeed/rss/channel/item
662+ start $s_curr when true()
663+ end next $e_next when
664+ fn:day-from-dateTime(xs:dateTime($e_next/pubDate)) ne
665+ fn:day-from-dateTime(xs:dateTime($s_curr/pubDate))
666+ return
667+ <item>
668+ <date>{xs:date(xs:dateTime($s_curr/pubDate))}</date>
669+ { for $a in fn:distinct-values($w/author)
670+ return
671+ <author name="{$a}">
672+ <titles>
673+ { $w[author eq $a]/title }
674+ </titles>
675+ </author>
676+ }
677+ </item>
678+}</result>
679
680=== modified file 'test/rbkt/Queries/zorba/windowing/q17.xq'
681--- test/rbkt/Queries/zorba/windowing/q17.xq 2011-01-24 11:43:14 +0000
682+++ test/rbkt/Queries/zorba/windowing/q17.xq 2012-03-13 03:02:21 +0000
683@@ -1,17 +1,17 @@
684 declare variable $seq := fn:doc("cxml.xml");
685
686 <result>{
687-for sliding window $w in $seq/sequence/*
688- start $cur previous $prev
689+for sliding window $w in $seq/sequence/*
690+ start $cur previous $prev
691 when day-from-dateTime($cur/@date) ne day-from-dateTime($prev/@date) or empty($prev)
692 end $end next $next
693 when day-from-dateTime(xs:dateTime($end/@date)) ne
694 day-from-dateTime(xs:dateTime($next/@date))
695 return
696 <mostValuableCustomer endOfDay="{xs:dateTime($cur/@date)}">{
697- let $companies := for $x in distinct-values($w/@billTo )
698+ let $companies := for $x in distinct-values($w/@billTo )
699 return <amount company="{$x}">{sum($w[@billTo eq $x]/@total)}</amount>
700- let $max := max($companies)
701+ let $max := max($companies)
702 for $company in $companies
703 where $company eq xs:untypedAtomic($max)
704 return $company
705
706=== added file 'test/rbkt/Queries/zorba/windowing/q17s.xq'
707--- test/rbkt/Queries/zorba/windowing/q17s.xq 1970-01-01 00:00:00 +0000
708+++ test/rbkt/Queries/zorba/windowing/q17s.xq 2012-03-13 03:02:21 +0000
709@@ -0,0 +1,21 @@
710+import schema default element namespace "" at "cxml.xsd";
711+
712+declare variable $seq := validate { fn:doc("cxml.xml") };
713+
714+<result>{
715+for sliding window $w in $seq/sequence/*
716+ start $cur previous $prev
717+ when day-from-dateTime($cur/@date) ne day-from-dateTime($prev/@date) or empty($prev)
718+ end $end next $next
719+ when day-from-dateTime(xs:dateTime($end/@date)) ne
720+day-from-dateTime(xs:dateTime($next/@date))
721+return
722+ <mostValuableCustomer endOfDay="{xs:dateTime($cur/@date)}">{
723+ let $companies := for $x in distinct-values($w/@billTo )
724+ return <amount company="{$x}">{sum($w[@billTo eq $x]/@total)}</amount>
725+ let $max := max($companies)
726+ for $company in $companies
727+ where $company eq xs:untypedAtomic($max)
728+ return $company
729+ }</mostValuableCustomer>
730+}</result>
731
732=== modified file 'test/rbkt/Queries/zorba/windowing/q18.xq'
733--- test/rbkt/Queries/zorba/windowing/q18.xq 2011-02-01 15:56:40 +0000
734+++ test/rbkt/Queries/zorba/windowing/q18.xq 2012-03-13 03:02:21 +0000
735@@ -1,12 +1,12 @@
736 declare variable $seq := fn:doc("cxml.xml");
737
738 <result>{
739- for sliding window $w in $seq/sequence/*
740- start $s when $s[self::OrderRequest]
741- end $e when $e/@orderID eq $s/@orderID and
742- ( $e[self::ConfirmationRequest] and $e/@status eq "reject"
743- or $e[self::ShipNotice])
744+ for sliding window $w in $seq/sequence/*
745+ start $s when $s[self::OrderRequest]
746+ end $e when $e/@orderID eq $s/@orderID
747+ and ($e[self::ConfirmationRequest] and $e/@status eq "reject"
748+ or $e[self::ShipNotice])
749 where $e[self::ShipNotice]
750- return
751- <timeToShip orderID="{ $s/@orderID}">{xs:dateTime($e/@date) - xs:dateTime($s/@date) }</timeToShip>
752+ return
753+ <timeToShip orderID="{ $s/@orderID}">{xs:dateTime($e/@date) - xs:dateTime($s/@date) }</timeToShip>
754 }</result>
755
756=== added file 'test/rbkt/Queries/zorba/windowing/q18s.xq'
757--- test/rbkt/Queries/zorba/windowing/q18s.xq 1970-01-01 00:00:00 +0000
758+++ test/rbkt/Queries/zorba/windowing/q18s.xq 2012-03-13 03:02:21 +0000
759@@ -0,0 +1,14 @@
760+import schema default element namespace "" at "cxml.xsd";
761+
762+declare variable $seq := validate { fn:doc("cxml.xml") };
763+
764+<result>{
765+ for sliding window $w in $seq/sequence/*
766+ start $s when $s[self::OrderRequest]
767+ end $e when $e/@orderID eq $s/@orderID
768+ and ($e[self::ConfirmationRequest] and $e/@status eq "reject"
769+ or $e[self::ShipNotice])
770+ where $e[self::ShipNotice]
771+ return
772+ <timeToShip orderID="{ $s/@orderID}">{xs:dateTime($e/@date) - xs:dateTime($s/@date) }</timeToShip>
773+}</result>
774
775=== modified file 'test/rbkt/Queries/zorba/windowing/q19.xq'
776--- test/rbkt/Queries/zorba/windowing/q19.xq 2011-01-25 10:11:46 +0000
777+++ test/rbkt/Queries/zorba/windowing/q19.xq 2012-03-13 03:02:21 +0000
778@@ -1,26 +1,22 @@
779 declare variable $seq := fn:doc("cxml.xml");
780
781-<result>
782-{
783-for sliding window $w in $seq/sequence/*
784+<result>{
785+ for sliding window $w in $seq/sequence/*
786 start previous $wSPrev when $wSPrev[self::OrderRequest]
787- end next $wENext when $wENext/@orderID eq $wSPrev/@orderID and
788- ( $wENext[self::ConfirmationRequest] and $wENext/@status eq "reject")
789- or $wENext[self::ShipNotice]
790-where $wENext[self::ShipNotice]
791-return
792- <bundleWith orderId="{$wSPrev/@orderID}">
793- {
794- for sliding window $bundle in $w
795- start $bSCur
796+ end next $wENext when $wENext/@orderID eq $wSPrev/@orderID
797+ and ($wENext[self::ConfirmationRequest] and $wENext/@status eq "reject"
798+ or $wENext[self::ShipNotice])
799+ where $wENext[self::ShipNotice]
800+ return
801+ <bundleWith orderId="{$wSPrev/@orderID}">{
802+ for sliding window $bundle in $w
803+ start $bSCur
804 when $bSCur[self::OrderRequest] and $bSCur/@shipTo eq $wSPrev/@shipTo
805- end $bECur next $bENext
806- when $bECur/@orderID eq $bSCur/@orderID
807- and ($bECur[self::ConfirmationRequest] and $bECur/@status eq "reject")
808- or $bECur[self::ShipNotice]
809+ end $bECur next $bENext
810+ when $bECur/@orderID eq $bSCur/@orderID
811+ and ($bECur[self::ConfirmationRequest] and $bECur/@status eq "reject"
812+ or $bECur[self::ShipNotice])
813 where empty($bENext)
814 return $bSCur
815- }
816- </bundleWith>
817-}
818-</result>
819+ }</bundleWith>
820+}</result>
821
822=== added file 'test/rbkt/Queries/zorba/windowing/q19s.xq'
823--- test/rbkt/Queries/zorba/windowing/q19s.xq 1970-01-01 00:00:00 +0000
824+++ test/rbkt/Queries/zorba/windowing/q19s.xq 2012-03-13 03:02:21 +0000
825@@ -0,0 +1,24 @@
826+import schema default element namespace "" at "cxml.xsd";
827+
828+declare variable $seq := validate { fn:doc("cxml.xml") };
829+
830+<result>{
831+ for sliding window $w in $seq/sequence/*
832+ start previous $wSPrev when $wSPrev[self::OrderRequest]
833+ end next $wENext when $wENext/@orderID eq $wSPrev/@orderID
834+ and ($wENext[self::ConfirmationRequest] and $wENext/@status eq "reject"
835+ or $wENext[self::ShipNotice])
836+ where $wENext[self::ShipNotice]
837+ return
838+ <bundleWith orderId="{$wSPrev/@orderID}">{
839+ for sliding window $bundle in $w
840+ start $bSCur
841+ when $bSCur[self::OrderRequest] and $bSCur/@shipTo eq $wSPrev/@shipTo
842+ end $bECur next $bENext
843+ when $bECur/@orderID eq $bSCur/@orderID
844+ and ($bECur[self::ConfirmationRequest] and $bECur/@status eq "reject"
845+ or $bECur[self::ShipNotice])
846+ where empty($bENext)
847+ return $bSCur
848+ }</bundleWith>
849+}</result>
850
851=== added file 'test/rbkt/Queries/zorba/windowing/q1s.xq'
852--- test/rbkt/Queries/zorba/windowing/q1s.xq 1970-01-01 00:00:00 +0000
853+++ test/rbkt/Queries/zorba/windowing/q1s.xq 2012-03-13 03:02:21 +0000
854@@ -0,0 +1,15 @@
855+import schema default element namespace "" at "arrange_rows.xsd";
856+
857+declare variable $seq := validate { validate { fn:doc("arrange_rows.xml") } };
858+
859+<table>{
860+ for tumbling window $w in $seq/doc/*
861+ start at $x when fn:true()
862+ end at $y when $y - $x = 2
863+ return
864+ <tr>{
865+ for $i in $w
866+ return
867+ <td>{data($i)}</td>
868+ }</tr>
869+}</table>
870
871=== modified file 'test/rbkt/Queries/zorba/windowing/q2.xq'
872--- test/rbkt/Queries/zorba/windowing/q2.xq 2011-01-24 11:43:14 +0000
873+++ test/rbkt/Queries/zorba/windowing/q2.xq 2012-03-13 03:02:21 +0000
874@@ -1,12 +1,12 @@
875 declare variable $seq := fn:doc("head_para.xml");
876
877 <chapter>{
878- for tumbling window $w in $seq/body/*
879- start previous $s when $s[self::h2]
880- end next $e when $e[self::h2]
881+ for tumbling window $w in $seq/body/*
882+ start previous $s when $s[self::h2]
883+ end next $e when $e[self::h2]
884 return
885 <section title="{data($s)}">{
886- for $x in $w
887+ for $x in $w
888 return
889 <para>{data($x)}</para>
890 }</section>
891
892=== added file 'test/rbkt/Queries/zorba/windowing/q2s.xq'
893--- test/rbkt/Queries/zorba/windowing/q2s.xq 1970-01-01 00:00:00 +0000
894+++ test/rbkt/Queries/zorba/windowing/q2s.xq 2012-03-13 03:02:21 +0000
895@@ -0,0 +1,15 @@
896+import schema default element namespace "" at "head_para.xsd";
897+
898+declare variable $seq := validate { fn:doc("head_para.xml") };
899+
900+<chapter>{
901+ for tumbling window $w in $seq/body/*
902+ start previous $s when $s[self::h2]
903+ end next $e when $e[self::h2]
904+ return
905+ <section title="{data($s)}">{
906+ for $x in $w
907+ return
908+ <para>{data($x)}</para>
909+ }</section>
910+}</chapter>
911
912=== added file 'test/rbkt/Queries/zorba/windowing/q3s.xq'
913--- test/rbkt/Queries/zorba/windowing/q3s.xq 1970-01-01 00:00:00 +0000
914+++ test/rbkt/Queries/zorba/windowing/q3s.xq 2012-03-13 03:02:21 +0000
915@@ -0,0 +1,13 @@
916+import schema default element namespace "" at "term_def_list.xsd";
917+
918+declare variable $seq := validate { fn:doc("term_def_list.xml") };
919+
920+<doc>{
921+for tumbling window $w in $seq/doc/*
922+ start $x when $x[self::dt]
923+ end $y next $z when $y[self::dd] and $z[self::dt]
924+return
925+ <term>{
926+ $w
927+ }</term>
928+}</doc>
929
930=== added file 'test/rbkt/Queries/zorba/windowing/q4s.xq'
931--- test/rbkt/Queries/zorba/windowing/q4s.xq 1970-01-01 00:00:00 +0000
932+++ test/rbkt/Queries/zorba/windowing/q4s.xq 2012-03-13 03:02:21 +0000
933@@ -0,0 +1,13 @@
934+import schema default element namespace "" at "temp_events.xsd";
935+
936+declare variable $timesequence := validate { fn:doc("temp_events.xml") };
937+
938+let $MAX_DIFF := 2
939+
940+for sliding window $w in $timesequence/stream/event
941+ start $s_curr at $s_pos previous $s_prev
942+ when ($s_curr/@time ne $s_prev/@time) or (empty($s_prev))
943+ only end next $e_next
944+ when $e_next/@time - $s_curr/@time gt $MAX_DIFF
945+return
946+ avg( $w/@temp )
947
948=== modified file 'test/rbkt/Queries/zorba/windowing/q5.xq'
949--- test/rbkt/Queries/zorba/windowing/q5.xq 2011-01-24 11:43:14 +0000
950+++ test/rbkt/Queries/zorba/windowing/q5.xq 2012-03-13 03:02:21 +0000
951@@ -1,10 +1,11 @@
952 declare variable $timesequence := fn:doc("temp_events.xml");
953+
954 let $SMOOTH_CONST := 0.2
955
956 for sliding window $w in $timesequence/stream/event
957 start at $s_pos when true()
958 only end at $e_pos when $e_pos - $s_pos eq 2
959-return
960+return
961 round-half-to-even($SMOOTH_CONST * data($w[3]/@temp) + (1 - $SMOOTH_CONST) *
962- ( $SMOOTH_CONST * data($w[2]/@temp) +
963+ ( $SMOOTH_CONST * data($w[2]/@temp) +
964 (1 - $SMOOTH_CONST) * data($w[1]/@temp) ), 2)
965
966=== added file 'test/rbkt/Queries/zorba/windowing/q5s.xq'
967--- test/rbkt/Queries/zorba/windowing/q5s.xq 1970-01-01 00:00:00 +0000
968+++ test/rbkt/Queries/zorba/windowing/q5s.xq 2012-03-13 03:02:21 +0000
969@@ -0,0 +1,13 @@
970+import schema default element namespace "" at "temp_events.xsd";
971+
972+declare variable $timesequence := validate { fn:doc("temp_events.xml") };
973+
974+let $SMOOTH_CONST := 0.2
975+
976+for sliding window $w in $timesequence/stream/event
977+ start at $s_pos when true()
978+ only end at $e_pos when $e_pos - $s_pos eq 2
979+return
980+ round-half-to-even($SMOOTH_CONST * data($w[3]/@temp) + (1 - $SMOOTH_CONST) *
981+ ( $SMOOTH_CONST * data($w[2]/@temp) +
982+ (1 - $SMOOTH_CONST) * data($w[1]/@temp) ), 2)
983
984=== modified file 'test/rbkt/Queries/zorba/windowing/q6.xq'
985--- test/rbkt/Queries/zorba/windowing/q6.xq 2011-01-24 11:43:14 +0000
986+++ test/rbkt/Queries/zorba/windowing/q6.xq 2012-03-13 03:02:21 +0000
987@@ -1,6 +1,6 @@
988 declare variable $seq := fn:doc("temp_events.xml");
989
990-for sliding window $w in $seq/stream/event
991+for sliding window $w in $seq/stream/event
992 start $s_curr when fn:true()
993 only end next $next when $next/@time > $s_curr/@time + 3
994 return
995
996=== added file 'test/rbkt/Queries/zorba/windowing/q6s.xq'
997--- test/rbkt/Queries/zorba/windowing/q6s.xq 1970-01-01 00:00:00 +0000
998+++ test/rbkt/Queries/zorba/windowing/q6s.xq 2012-03-13 03:02:21 +0000
999@@ -0,0 +1,11 @@
1000+import schema default element namespace "" at "temp_events.xsd";
1001+
1002+declare variable $seq := validate { fn:doc("temp_events.xml") };
1003+
1004+for sliding window $w in $seq/stream/event
1005+ start $s_curr when fn:true()
1006+ only end next $next when $next/@time > $s_curr/@time + 3
1007+return
1008+ let $avg := fn:avg($w/@temp)
1009+ where $avg * 2 lt xs:double($next/@temp) or $avg div 2 gt xs:double($next/@temp)
1010+ return <alarm>Outlier detected. Event id:{data($next/@time)}</alarm>
1011
1012=== modified file 'test/rbkt/Queries/zorba/windowing/q7.xq'
1013--- test/rbkt/Queries/zorba/windowing/q7.xq 2011-01-24 11:43:14 +0000
1014+++ test/rbkt/Queries/zorba/windowing/q7.xq 2012-03-13 03:02:21 +0000
1015@@ -1,13 +1,13 @@
1016 declare variable $seq := fn:doc("person_events.xml");
1017
1018 <result>{
1019- for tumbling window $w in $seq/stream/event
1020+ for tumbling window $w in $seq/stream/event
1021 start $s when $s/person eq "Anton" and $s/direction eq "in"
1022- only end $e next $n when xs:dateTime($n/@time) - xs:dateTime($s/@time) gt
1023- xs:dayTimeDuration("PT1H")
1024- or ($e/person eq "Barbara" and $e/direction eq "in")
1025- or ($e/person eq "Anton" and $e/direction eq "out")
1026+ only end $e next $n when xs:dateTime($n/@time) - xs:dateTime($s/@time) gt
1027+ xs:dayTimeDuration("PT1H")
1028+ or ($e/person eq "Barbara" and $e/direction eq "in")
1029+ or ($e/person eq "Anton" and $e/direction eq "out")
1030 where $e/person eq "Barbara" and $e/direction eq "in"
1031- return
1032+ return
1033 <warning time="{ $e/@time }">Barbara: Anton arrived 1h ago</warning>
1034 }</result>
1035
1036=== added file 'test/rbkt/Queries/zorba/windowing/q7s.xq'
1037--- test/rbkt/Queries/zorba/windowing/q7s.xq 1970-01-01 00:00:00 +0000
1038+++ test/rbkt/Queries/zorba/windowing/q7s.xq 2012-03-13 03:02:21 +0000
1039@@ -0,0 +1,15 @@
1040+import schema default element namespace "" at "person_events.xsd";
1041+
1042+declare variable $seq := validate { fn:doc("person_events.xml") };
1043+
1044+<result>{
1045+ for tumbling window $w in $seq/stream/event
1046+ start $s when $s/person eq "Anton" and $s/direction eq "in"
1047+ only end $e next $n when xs:dateTime($n/@time) - xs:dateTime($s/@time) gt
1048+ xs:dayTimeDuration("PT1H")
1049+ or ($e/person eq "Barbara" and $e/direction eq "in")
1050+ or ($e/person eq "Anton" and $e/direction eq "out")
1051+ where $e/person eq "Barbara" and $e/direction eq "in"
1052+ return
1053+ <warning time="{ $e/@time }">Barbara: Anton arrived 1h ago</warning>
1054+}</result>
1055
1056=== modified file 'test/rbkt/Queries/zorba/windowing/q8.xq'
1057--- test/rbkt/Queries/zorba/windowing/q8.xq 2011-01-25 10:11:46 +0000
1058+++ test/rbkt/Queries/zorba/windowing/q8.xq 2012-03-13 03:02:21 +0000
1059@@ -1,14 +1,13 @@
1060 declare variable $seq := fn:doc("person_events.xml");
1061
1062-<result>
1063-{
1064+<result>{
1065 for sliding window $w in $seq/stream/event
1066- start $s when $s/direction eq "in"
1067- only end $e when $s/person eq $e/person and $e/direction eq "out"
1068+ start $s when $s/direction eq "in"
1069+ only end $e when $s/person eq $e/person and
1070+ $e/direction eq "out"
1071 return
1072- <working-time>
1073+ <working-time>
1074 {$s/person}
1075 <time>{ xs:dateTime($e/@time) - xs:dateTime($s/@time)}</time>
1076 </working-time>
1077-}
1078-</result>
1079+}</result>
1080
1081=== added file 'test/rbkt/Queries/zorba/windowing/q8s.xq'
1082--- test/rbkt/Queries/zorba/windowing/q8s.xq 1970-01-01 00:00:00 +0000
1083+++ test/rbkt/Queries/zorba/windowing/q8s.xq 2012-03-13 03:02:21 +0000
1084@@ -0,0 +1,15 @@
1085+import schema default element namespace "" at "person_events.xsd";
1086+
1087+declare variable $seq := validate { fn:doc("person_events.xml") };
1088+
1089+<result>{
1090+for sliding window $w in $seq/stream/event
1091+ start $s when $s/direction eq "in"
1092+ only end $e when $s/person eq $e/person and
1093+ $e/direction eq "out"
1094+return
1095+ <working-time>
1096+ {$s/person}
1097+ <time>{ xs:dateTime($e/@time) - xs:dateTime($s/@time)}</time>
1098+ </working-time>
1099+}</result>
1100
1101=== modified file 'test/rbkt/Queries/zorba/windowing/q9.xq'
1102--- test/rbkt/Queries/zorba/windowing/q9.xq 2011-01-24 11:43:14 +0000
1103+++ test/rbkt/Queries/zorba/windowing/q9.xq 2012-03-13 03:02:21 +0000
1104@@ -1,16 +1,17 @@
1105 declare variable $seq := fn:doc("person_events.xml");
1106
1107 <result>{
1108-for sliding window $w in $seq/stream/event
1109+for sliding window $w in $seq/stream/event
1110 start $s when $s/direction eq "in"
1111 only end $e when $s/person eq $e/person and
1112 $e/direction eq "out"
1113 let $person := $s/person
1114 let $workingTime := xs:dateTime($e/@time) - xs:dateTime($s/@time)
1115 group by $person
1116+order by $person
1117 return
1118 <working-time>
1119- {$person}
1120+ <person>{ $person }</person>
1121 <time>{ sum($workingTime) }</time>
1122 </working-time>
1123 }</result>
1124
1125=== added file 'test/rbkt/Queries/zorba/windowing/q9s.xq'
1126--- test/rbkt/Queries/zorba/windowing/q9s.xq 1970-01-01 00:00:00 +0000
1127+++ test/rbkt/Queries/zorba/windowing/q9s.xq 2012-03-13 03:02:21 +0000
1128@@ -0,0 +1,19 @@
1129+import schema default element namespace "" at "person_events.xsd";
1130+
1131+declare variable $seq := validate { fn:doc("person_events.xml") };
1132+
1133+<result>{
1134+for sliding window $w in $seq/stream/event
1135+ start $s when $s/direction eq "in"
1136+ only end $e when $s/person eq $e/person and
1137+ $e/direction eq "out"
1138+let $person := $s/person
1139+let $workingTime := xs:dateTime($e/@time) - xs:dateTime($s/@time)
1140+group by $person
1141+order by $person
1142+return
1143+ <working-time>
1144+ <person>{ $person }</person>
1145+ <time>{ sum($workingTime) }</time>
1146+ </working-time>
1147+}</result>
1148
1149=== modified file 'test/rbkt/Queries/zorba/windowing/rss.xml'
1150--- test/rbkt/Queries/zorba/windowing/rss.xml 2011-01-24 11:43:14 +0000
1151+++ test/rbkt/Queries/zorba/windowing/rss.xml 2012-03-13 03:02:21 +0000
1152@@ -1,4 +1,4 @@
1153-<rss xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="rss.xsd">
1154+<rss>
1155 <channel>
1156 <title>DBIS RSS</title>
1157 <link>http://www.dbis.ethz.ch</link>
1158
1159=== added file 'test/rbkt/Queries/zorba/windowing/rss.xsd'
1160--- test/rbkt/Queries/zorba/windowing/rss.xsd 1970-01-01 00:00:00 +0000
1161+++ test/rbkt/Queries/zorba/windowing/rss.xsd 2012-03-13 03:02:21 +0000
1162@@ -0,0 +1,29 @@
1163+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
1164+ <xs:element name="rss">
1165+ <xs:complexType>
1166+ <xs:sequence>
1167+ <xs:element name="channel">
1168+ <xs:complexType>
1169+ <xs:sequence>
1170+ <xs:element name="title" type="xs:string"/>
1171+ <xs:element name="link" type="xs:anyURI"/>
1172+ <xs:element name="description" type="xs:string"/>
1173+ <xs:element name="language" type="xs:string"/>
1174+ <xs:element ref="item" maxOccurs="unbounded"/>
1175+ </xs:sequence>
1176+ </xs:complexType>
1177+ </xs:element>
1178+ </xs:sequence>
1179+ </xs:complexType>
1180+ </xs:element>
1181+ <xs:element name="item">
1182+ <xs:complexType>
1183+ <xs:sequence>
1184+ <xs:element name="title" type="xs:string"/>
1185+ <xs:element name="category" type="xs:string"/>
1186+ <xs:element name="author" type="xs:string"/>
1187+ <xs:element name="pubDate" type="xs:dateTime"/>
1188+ </xs:sequence>
1189+ </xs:complexType>
1190+ </xs:element>
1191+</xs:schema>
1192
1193=== modified file 'test/rbkt/Queries/zorba/windowing/temp_events.xml'
1194--- test/rbkt/Queries/zorba/windowing/temp_events.xml 2011-01-24 11:43:14 +0000
1195+++ test/rbkt/Queries/zorba/windowing/temp_events.xml 2012-03-13 03:02:21 +0000
1196@@ -1,9 +1,9 @@
1197-<stream xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="temp_events.xsd">
1198+<stream>
1199 <event temp="10" time="1"/>
1200 <event temp="8" time="2"/>
1201 <event temp="6" time="3"/>
1202 <event temp="13" time="4"/>
1203- <event temp="33" time="5"/>
1204- <event temp="10" time="6"/>
1205+ <event temp="32" time="5"/>
1206+ <event temp="9" time="6"/>
1207 <event temp="10" time="7"/>
1208 </stream>
1209
1210=== added file 'test/rbkt/Queries/zorba/windowing/temp_events.xsd'
1211--- test/rbkt/Queries/zorba/windowing/temp_events.xsd 1970-01-01 00:00:00 +0000
1212+++ test/rbkt/Queries/zorba/windowing/temp_events.xsd 2012-03-13 03:02:21 +0000
1213@@ -0,0 +1,14 @@
1214+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
1215+ <xs:element name="stream">
1216+ <xs:complexType>
1217+ <xs:sequence>
1218+ <xs:element name="event" maxOccurs="unbounded">
1219+ <xs:complexType>
1220+ <xs:attribute name="time" type="xs:integer" use="required"/>
1221+ <xs:attribute name="temp" type="xs:double" use="required"/>
1222+ </xs:complexType>
1223+ </xs:element>
1224+ </xs:sequence>
1225+ </xs:complexType>
1226+ </xs:element>
1227+</xs:schema>
1228
1229=== modified file 'test/rbkt/Queries/zorba/windowing/term_def_list.xml'
1230--- test/rbkt/Queries/zorba/windowing/term_def_list.xml 2011-01-24 11:43:14 +0000
1231+++ test/rbkt/Queries/zorba/windowing/term_def_list.xml 2012-03-13 03:02:21 +0000
1232@@ -1,4 +1,4 @@
1233-<doc xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="term_def_list.xsd">
1234+<doc>
1235 <dt>XML</dt>
1236 <dd>Extensible Markup Language</dd>
1237 <dt>XSLT</dt>
1238
1239=== added file 'test/rbkt/Queries/zorba/windowing/term_def_list.xsd'
1240--- test/rbkt/Queries/zorba/windowing/term_def_list.xsd 1970-01-01 00:00:00 +0000
1241+++ test/rbkt/Queries/zorba/windowing/term_def_list.xsd 2012-03-13 03:02:21 +0000
1242@@ -0,0 +1,12 @@
1243+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
1244+ <xs:element name="doc">
1245+ <xs:complexType>
1246+ <xs:sequence>
1247+ <xs:sequence maxOccurs="unbounded">
1248+ <xs:element name="dt" type="xs:string" maxOccurs="unbounded"/>
1249+ <xs:element name="dd" type="xs:string" maxOccurs="unbounded"/>
1250+ </xs:sequence>
1251+ </xs:sequence>
1252+ </xs:complexType>
1253+ </xs:element>
1254+</xs:schema>

Subscribers

People subscribed via source and target branches