Merge lp:~zorba-coders/zorba/bug-1189801 into lp:zorba

Proposed by Chris Hillery
Status: Merged
Approved by: Matthias Brantner
Approved revision: 11565
Merged at revision: 11566
Proposed branch: lp:~zorba-coders/zorba/bug-1189801
Merge into: lp:zorba
Diff against target: 1732 lines (+97/-886)
54 files modified
modules/CMakeLists.txt (+2/-2)
modules/com/zorba-xquery/www/modules/CMakeLists.txt (+0/-4)
modules/com/zorba-xquery/www/modules/node-reference.xq (+0/-84)
modules/structured-items/CMakeLists.txt (+3/-1)
modules/structured-items/reference.xq (+4/-4)
src/compiler/rewriter/rules/fold_rules.cpp (+1/-1)
src/context/static_context.cpp (+1/-6)
src/context/static_context.h (+0/-1)
src/functions/pregenerated/func_nodes.cpp (+0/-89)
src/functions/pregenerated/func_nodes.h (+0/-64)
src/functions/pregenerated/func_reference.cpp (+4/-4)
src/functions/pregenerated/function_enum.h (+0/-4)
src/runtime/nodes/nodes_impl.cpp (+0/-107)
src/runtime/nodes/pregenerated/nodes.cpp (+0/-112)
src/runtime/nodes/pregenerated/nodes.h (+0/-128)
src/runtime/pregenerated/iterator_enum.h (+0/-4)
src/runtime/spec/mappings.xml (+1/-5)
src/runtime/spec/nodes/nodes.xml (+0/-93)
src/runtime/visitors/pregenerated/planiter_visitor.h (+0/-20)
src/runtime/visitors/pregenerated/printer_visitor.cpp (+0/-56)
src/runtime/visitors/pregenerated/printer_visitor.h (+0/-12)
test/rbkt/Queries/zorba/collections/dynamic_node_ref1.xq (+2/-2)
test/rbkt/Queries/zorba/collections/edit/edit_collection_005.xq (+3/-3)
test/rbkt/Queries/zorba/collections/edit/edit_collection_006.xq (+1/-1)
test/rbkt/Queries/zorba/collections/edit/edit_collection_007.xq (+1/-1)
test/rbkt/Queries/zorba/collections/edit/edit_collection_008.xq (+1/-1)
test/rbkt/Queries/zorba/collections/edit/edit_collection_009.xq (+1/-1)
test/rbkt/Queries/zorba/collections/edit/edit_collection_010.xq (+1/-1)
test/rbkt/Queries/zorba/collections/paging_1.xq (+2/-2)
test/rbkt/Queries/zorba/collections/paging_2.xq (+2/-2)
test/rbkt/Queries/zorba/collections/paging_3.xq (+2/-2)
test/rbkt/Queries/zorba/collections/paging_4.xq (+2/-2)
test/rbkt/Queries/zorba/collections/paging_5.xq (+1/-1)
test/rbkt/Queries/zorba/fulltext/ft-module-tokenize-node-3.xq (+2/-2)
test/rbkt/Queries/zorba/fulltext/ft-module-tokenize-node-4.xq (+2/-2)
test/rbkt/Queries/zorba/paths/ref1.xq (+2/-2)
test/rbkt/Queries/zorba/reference/json-reference_1.xq (+1/-1)
test/rbkt/Queries/zorba/reference/json-reference_2.xq (+1/-1)
test/rbkt/Queries/zorba/reference/json-reference_3.xq (+1/-1)
test/rbkt/Queries/zorba/reference/json-reference_4.xq (+1/-1)
test/rbkt/Queries/zorba/reference/json-reference_5.xq (+1/-1)
test/rbkt/Queries/zorba/reference/reference.xqlib (+1/-1)
test/rbkt/Queries/zorba/reference/reference_1.xq (+4/-4)
test/rbkt/Queries/zorba/reference/reference_2.xq (+6/-6)
test/rbkt/Queries/zorba/reference/reference_3.xq (+11/-11)
test/rbkt/Queries/zorba/reference/reference_4.xq (+2/-2)
test/rbkt/Queries/zorba/reference/reference_5.xq (+8/-8)
test/rbkt/Queries/zorba/reference/reference_coll_1.xq (+2/-2)
test/rbkt/Queries/zorba/reference/reference_coll_2.xq (+2/-2)
test/rbkt/Queries/zorba/reference/reference_coll_3.xq (+2/-2)
test/rbkt/Queries/zorba/reference/reference_coll_4.xq (+4/-4)
test/rbkt/Queries/zorba/reference/reference_coll_5.xq (+5/-5)
test/rbkt/Queries/zorba/string/AnalyzeString/http-client-doc.htm (+1/-1)
test/rbkt/Queries/zorba/xqddf/test-node-reference.xq (+3/-7)
To merge this branch: bzr merge lp:~zorba-coders/zorba/bug-1189801
Reviewer Review Type Date Requested Status
Matthias Brantner Approve
Chris Hillery Approve
Review via email: mp+176621@code.launchpad.net

Commit message

Updated reference module to Zorba 3.0 standards. Removed node-reference module (use reference module instead).

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

Validation queue starting for the following merge proposals:
https://code.launchpad.net/~zorba-coders/zorba/bug-1189801/+merge/176621

Progress dashboard at http://jenkins.lambda.nu/view/ValidationQueue

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

Validation queue result for https://code.launchpad.net/~zorba-coders/zorba/bug-1189801/+merge/176621

Stage "TestZorbaUbuntu" failed.
3 tests failed (8353 total tests run).

Check test results at http://jenkins.lambda.nu/job/TestZorbaUbuntu/108/testReport/ to view the results.

lp:~zorba-coders/zorba/bug-1189801 updated
11564. By Chris Hillery

Re-introduce fold rule for new reference module.

11565. By Chris Hillery

Updated tests.

Revision history for this message
Chris Hillery (ceejatec) :
review: Approve
Revision history for this message
Matthias Brantner (matthias-brantner) :
review: Approve
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

Validation queue starting for the following merge proposals:
https://code.launchpad.net/~zorba-coders/zorba/bug-1189801/+merge/176621

Progress dashboard at http://jenkins.lambda.nu/view/ValidationQueue

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

Validation queue result for https://code.launchpad.net/~zorba-coders/zorba/bug-1189801/+merge/176621

Stage "CommitZorba" failed.

Check console output at http://jenkins.lambda.nu/job/CommitZorba/60/console to view the results.

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

Validation queue starting for the following merge proposals:
https://code.launchpad.net/~zorba-coders/zorba/bug-1189801/+merge/176621

Progress dashboard at http://jenkins.lambda.nu/view/ValidationQueue

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

Validation queue succeeded - proposal merged!

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'modules/CMakeLists.txt'
2--- modules/CMakeLists.txt 2013-07-17 15:53:51 +0000
3+++ modules/CMakeLists.txt 2013-07-24 23:57:26 +0000
4@@ -1,4 +1,4 @@
5-# Copyright 2006-2010 The FLWOR Foundation.
6+# Copyright 2006-2013 The FLWOR Foundation.
7 #
8 # Licensed under the Apache License, Version 2.0 (the "License");
9 # you may not use this file except in compliance with the License.
10@@ -20,7 +20,7 @@
11 ADD_SUBDIRECTORY(w3c)
12 ADD_SUBDIRECTORY(full-text)
13 ADD_SUBDIRECTORY(json)
14-ADD_SUBDIRECTORY(nodes)
15+ADD_SUBDIRECTORY(structured-items)
16
17 # Add external module projects - any subdirectories of a directory
18 # named "zorba_modules" as a sibling to the main Zorba source
19
20=== modified file 'modules/com/zorba-xquery/www/modules/CMakeLists.txt'
21--- modules/com/zorba-xquery/www/modules/CMakeLists.txt 2013-07-17 15:48:38 +0000
22+++ modules/com/zorba-xquery/www/modules/CMakeLists.txt 2013-07-24 23:57:26 +0000
23@@ -56,10 +56,6 @@
24 URI "http://www.zorba-xquery.com/modules/datetime")
25 DECLARE_ZORBA_MODULE(FILE fetch.xq VERSION 2.0
26 URI "http://www.zorba-xquery.com/modules/fetch")
27-DECLARE_ZORBA_MODULE(FILE node-reference.xq VERSION 2.0
28- URI "http://www.zorba-xquery.com/modules/node-reference")
29-DECLARE_ZORBA_MODULE(FILE reference.xq VERSION 1.0
30- URI "http://www.zorba-xquery.com/modules/reference")
31 DECLARE_ZORBA_MODULE(FILE node.xq VERSION 2.0
32 URI "http://www.zorba-xquery.com/modules/node")
33 DECLARE_ZORBA_MODULE(FILE item.xq VERSION 1.0
34
35=== removed file 'modules/com/zorba-xquery/www/modules/node-reference.xq'
36--- modules/com/zorba-xquery/www/modules/node-reference.xq 2013-06-25 03:55:20 +0000
37+++ modules/com/zorba-xquery/www/modules/node-reference.xq 1970-01-01 00:00:00 +0000
38@@ -1,84 +0,0 @@
39-xquery version "1.0";
40-
41-(:
42- : Copyright 2006-2009 The FLWOR Foundation.
43- :
44- : Licensed under the Apache License, Version 2.0 (the "License");
45- : you may not use this file except in compliance with the License.
46- : You may obtain a copy of the License at
47- :
48- : http://www.apache.org/licenses/LICENSE-2.0
49- :
50- : Unless required by applicable law or agreed to in writing, software
51- : distributed under the License is distributed on an "AS IS" BASIS,
52- : WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
53- : See the License for the specific language governing permissions and
54- : limitations under the License.
55-:)
56-
57-(:~
58- : The module provides functions to compute an immutable and opaque reference
59- : for any node and to retrieve nodes given their identifier. The identifiers
60- : are immutable, i.e. a node identifier does not change during the node lifetime
61- : and cannot be reused for another node after the original node gets deleted.
62- : Identifiers are unique, in that, two different nodes will never have the same
63- : identifier. A node, at any time during its lifetime, can be retrieved by its
64- : identifier.
65- :
66- : <p>Please see the <a href="../../html/data_lifecycle.html">data lifecycle
67- : documentation</a> about details on storing nodes in collections or as documents.</p>
68- :
69- : @see <a href="../../html/data_lifecycle.html">Data Lifecycle</a>
70- :
71- : @author Federico Cavalieri
72- :
73- : @project Zorba/XQuery Data Model/Node/Node Reference
74- :
75- :)
76-module namespace ref = "http://www.zorba-xquery.com/modules/node-reference";
77-
78-declare namespace zerr = "http://zorba.io/modules/zorba-errors";
79-
80-declare namespace ver = "http://www.zorba-xquery.com/options/versioning";
81-
82-declare option ver:module-version "2.0";
83-
84-(:~
85- : Returns an immutable and opaque node reference (with type xs:anyURI) for
86- : a given node.
87- :
88- : <p>The generated identifier is immutable, i.e. a node identifier does not
89- : change during the node lifetime and cannot be reused for another node after
90- : the original node gets deleted.</p>
91- :
92- : <p>Identifiers are also unique, in that, two different nodes will never
93- : have the same identifier.</p>
94- :
95- : A node, at any time during its lifetime, can be retrieved by its
96- : identifier, using the <tt>ref:node-by-reference</tt> function.
97- :
98- : @param $arg the node for which the URI should be computed
99- :
100- : @return the opaque URI of the node.
101- :)
102-declare function ref:node-reference(
103- $arg as node()
104-) as xs:anyURI external;
105-
106-(:~
107- : Returns the node identified by the given node reference.
108- :
109- : <p>The function returns the empty sequence if the node
110- : that is referenced does not exist.</p>
111- :
112- : @param $arg the URI of the node to retrieve.
113- :
114- : @return the node identified by the URI passed as parameter
115- : or the empty-sequence if no node with that URI is found.
116- :
117- : @error zerr:ZAPI0028 if the given URI is not a valid node reference
118- : computed by the <tt>ref:node-reference</tt> function.
119- :)
120-declare function ref:node-by-reference(
121- $arg as xs:anyURI
122-) as node()? external;
123
124=== renamed directory 'modules/nodes' => 'modules/structured-items'
125=== modified file 'modules/structured-items/CMakeLists.txt'
126--- modules/nodes/CMakeLists.txt 2013-07-09 07:44:44 +0000
127+++ modules/structured-items/CMakeLists.txt 2013-07-24 23:57:26 +0000
128@@ -13,4 +13,6 @@
129 # limitations under the License.
130
131 DECLARE_ZORBA_MODULE(FILE node-position.xq VERSION 2.0
132- URI "http://zorba.io/modules/node-position")
133\ No newline at end of file
134+ URI "http://zorba.io/modules/node-position")
135+DECLARE_ZORBA_MODULE(FILE reference.xq VERSION 1.0
136+ URI "http://zorba.io/modules/reference")
137
138=== renamed file 'modules/com/zorba-xquery/www/modules/reference.xq' => 'modules/structured-items/reference.xq'
139--- modules/com/zorba-xquery/www/modules/reference.xq 2013-06-25 03:55:20 +0000
140+++ modules/structured-items/reference.xq 2013-07-24 23:57:26 +0000
141@@ -36,7 +36,7 @@
142 : @project Zorba/XQuery Data Model/Node/Reference
143 :
144 :)
145-module namespace ref = "http://www.zorba-xquery.com/modules/reference";
146+module namespace ref = "http://zorba.io/modules/reference";
147
148 declare namespace zerr = "http://zorba.io/modules/zorba-errors";
149
150@@ -45,8 +45,8 @@
151 declare option ver:module-version "1.0";
152
153 (:~
154- : Returns an immutable and opaque reference (with type xs:anyURI) for
155- : a given node, object, or array.
156+ : <p>Returns an immutable and opaque reference (with type xs:anyURI) for
157+ : a given node, object, or array.</p>
158 :
159 : <p>The generated identifier is immutable, i.e. a identifier does not
160 : change during the item's lifetime and cannot be reused for another node after
161@@ -73,7 +73,7 @@
162 ) as xs:string external;
163
164 (:~
165- : Returns the node, object, or array identified by the given reference.
166+ : <p>Returns the node, object, or array identified by the given reference.</p>
167 :
168 : <p>The function returns the empty sequence if the item
169 : that is referenced does not exist.</p>
170
171=== modified file 'src/compiler/rewriter/rules/fold_rules.cpp'
172--- src/compiler/rewriter/rules/fold_rules.cpp 2013-05-24 16:34:11 +0000
173+++ src/compiler/rewriter/rules/fold_rules.cpp 2013-07-24 23:57:26 +0000
174@@ -174,7 +174,7 @@
175 curNonDiscardable = ANNOTATION_TRUE_FIXED;
176 curUnfoldable = ANNOTATION_TRUE_FIXED;
177 }
178- else if (fkind == FunctionConsts::FN_ZORBA_REF_NODE_BY_REFERENCE_1)
179+ else if (fkind == FunctionConsts::FN_REFERENCE_DEREFERENCE_1)
180 {
181 curDereferencesNodes = ANNOTATION_TRUE;
182 }
183
184=== modified file 'src/context/static_context.cpp'
185--- src/context/static_context.cpp 2013-07-17 15:48:38 +0000
186+++ src/context/static_context.cpp 2013-07-24 23:57:26 +0000
187@@ -364,12 +364,8 @@
188 "http://zorba.io/modules/json-xml";
189
190 const char*
191-static_context::ZORBA_NODEREF_FN_NS =
192-"http://www.zorba-xquery.com/modules/node-reference";
193-
194-const char*
195 static_context::ZORBA_REFERENCE_FN_NS =
196-"http://www.zorba-xquery.com/modules/reference";
197+"http://zorba.io/modules/reference";
198
199 const char*
200 static_context::ZORBA_NODEPOS_FN_NS =
201@@ -543,7 +539,6 @@
202 {
203 return (ns == ZORBA_MATH_FN_NS ||
204 ns == ZORBA_BASE64_FN_NS ||
205- ns == ZORBA_NODEREF_FN_NS ||
206 ns == ZORBA_REFERENCE_FN_NS ||
207 ns == ZORBA_NODEPOS_FN_NS ||
208
209
210=== modified file 'src/context/static_context.h'
211--- src/context/static_context.h 2013-07-02 21:32:23 +0000
212+++ src/context/static_context.h 2013-07-24 23:57:26 +0000
213@@ -522,7 +522,6 @@
214
215 static const char* ZORBA_JSON_FN_NS;
216
217- static const char* ZORBA_NODEREF_FN_NS;
218 static const char* ZORBA_REFERENCE_FN_NS;
219 static const char* ZORBA_NODEPOS_FN_NS;
220 static const char* ZORBA_STORE_DYNAMIC_COLLECTIONS_DDL_FN_NS;
221
222=== modified file 'src/functions/pregenerated/func_nodes.cpp'
223--- src/functions/pregenerated/func_nodes.cpp 2013-03-05 23:11:50 +0000
224+++ src/functions/pregenerated/func_nodes.cpp 2013-07-24 23:57:26 +0000
225@@ -31,46 +31,6 @@
226
227
228
229-PlanIter_t fn_zorba_ref_node_reference::codegen(
230- CompilerCB*,
231- static_context* sctx,
232- const QueryLoc& loc,
233- std::vector<PlanIter_t>& argv,
234- expr& ann) const
235-{
236- return new NodeReferenceIterator(sctx, loc, argv);
237-}
238-
239-PlanIter_t fn_zorba_ref_has_node_reference::codegen(
240- CompilerCB*,
241- static_context* sctx,
242- const QueryLoc& loc,
243- std::vector<PlanIter_t>& argv,
244- expr& ann) const
245-{
246- return new HasNodeReferenceIterator(sctx, loc, argv);
247-}
248-
249-PlanIter_t fn_zorba_ref_assign_node_reference::codegen(
250- CompilerCB*,
251- static_context* sctx,
252- const QueryLoc& loc,
253- std::vector<PlanIter_t>& argv,
254- expr& ann) const
255-{
256- return new AssignNodeReferenceIterator(sctx, loc, argv);
257-}
258-
259-PlanIter_t fn_zorba_ref_node_by_reference::codegen(
260- CompilerCB*,
261- static_context* sctx,
262- const QueryLoc& loc,
263- std::vector<PlanIter_t>& argv,
264- expr& ann) const
265-{
266- return new NodeByReferenceIterator(sctx, loc, argv);
267-}
268-
269 PlanIter_t fn_local_name::codegen(
270 CompilerCB*,
271 static_context* sctx,
272@@ -276,55 +236,6 @@
273
274
275 {
276- DECL_WITH_KIND(sctx, fn_zorba_ref_node_reference,
277- (createQName("http://www.zorba-xquery.com/modules/node-reference","","node-reference"),
278- GENV_TYPESYSTEM.ANY_NODE_TYPE_ONE,
279- GENV_TYPESYSTEM.ANY_URI_TYPE_ONE),
280- FunctionConsts::FN_ZORBA_REF_NODE_REFERENCE_1);
281-
282- }
283-
284-
285-
286-
287- {
288- DECL_WITH_KIND(sctx, fn_zorba_ref_has_node_reference,
289- (createQName("http://www.zorba-xquery.com/modules/node-reference","","has-node-reference"),
290- GENV_TYPESYSTEM.ANY_NODE_TYPE_ONE,
291- GENV_TYPESYSTEM.BOOLEAN_TYPE_ONE),
292- FunctionConsts::FN_ZORBA_REF_HAS_NODE_REFERENCE_1);
293-
294- }
295-
296-
297-
298-
299- {
300- DECL_WITH_KIND(sctx, fn_zorba_ref_assign_node_reference,
301- (createQName("http://www.zorba-xquery.com/modules/node-reference","","assign-node-reference"),
302- GENV_TYPESYSTEM.ANY_NODE_TYPE_ONE,
303- GENV_TYPESYSTEM.ANY_URI_TYPE_ONE,
304- GENV_TYPESYSTEM.BOOLEAN_TYPE_ONE),
305- FunctionConsts::FN_ZORBA_REF_ASSIGN_NODE_REFERENCE_2);
306-
307- }
308-
309-
310-
311-
312- {
313- DECL_WITH_KIND(sctx, fn_zorba_ref_node_by_reference,
314- (createQName("http://www.zorba-xquery.com/modules/node-reference","","node-by-reference"),
315- GENV_TYPESYSTEM.ANY_URI_TYPE_ONE,
316- GENV_TYPESYSTEM.ANY_NODE_TYPE_QUESTION),
317- FunctionConsts::FN_ZORBA_REF_NODE_BY_REFERENCE_1);
318-
319- }
320-
321-
322-
323-
324- {
325 DECL_WITH_KIND(sctx, fn_local_name,
326 (createQName("http://www.w3.org/2005/xpath-functions","","local-name"),
327 GENV_TYPESYSTEM.STRING_TYPE_ONE),
328
329=== modified file 'src/functions/pregenerated/func_nodes.h'
330--- src/functions/pregenerated/func_nodes.h 2013-03-05 23:11:50 +0000
331+++ src/functions/pregenerated/func_nodes.h 2013-07-24 23:57:26 +0000
332@@ -38,70 +38,6 @@
333
334
335
336-//fn-zorba-ref:node-reference
337-class fn_zorba_ref_node_reference : public function
338-{
339-public:
340- fn_zorba_ref_node_reference(const signature& sig, FunctionConsts::FunctionKind kind)
341- :
342- function(sig, kind)
343- {
344-
345- }
346-
347- bool mustCopyInputNodes(expr* fo, csize producer) const { return true; }
348-
349- CODEGEN_DECL();
350-};
351-
352-
353-//fn-zorba-ref:has-node-reference
354-class fn_zorba_ref_has_node_reference : public function
355-{
356-public:
357- fn_zorba_ref_has_node_reference(const signature& sig, FunctionConsts::FunctionKind kind)
358- :
359- function(sig, kind)
360- {
361-
362- }
363-
364- CODEGEN_DECL();
365-};
366-
367-
368-//fn-zorba-ref:assign-node-reference
369-class fn_zorba_ref_assign_node_reference : public function
370-{
371-public:
372- fn_zorba_ref_assign_node_reference(const signature& sig, FunctionConsts::FunctionKind kind)
373- :
374- function(sig, kind)
375- {
376-
377- }
378-
379- unsigned short getScriptingKind() const { return SEQUENTIAL_FUNC_EXPR; }
380-
381- CODEGEN_DECL();
382-};
383-
384-
385-//fn-zorba-ref:node-by-reference
386-class fn_zorba_ref_node_by_reference : public function
387-{
388-public:
389- fn_zorba_ref_node_by_reference(const signature& sig, FunctionConsts::FunctionKind kind)
390- :
391- function(sig, kind)
392- {
393-
394- }
395-
396- CODEGEN_DECL();
397-};
398-
399-
400 //fn:local-name
401 class fn_local_name : public function
402 {
403
404=== modified file 'src/functions/pregenerated/func_reference.cpp'
405--- src/functions/pregenerated/func_reference.cpp 2013-03-05 23:11:50 +0000
406+++ src/functions/pregenerated/func_reference.cpp 2013-07-24 23:57:26 +0000
407@@ -77,7 +77,7 @@
408
409 {
410 DECL_WITH_KIND(sctx, fn_reference_reference,
411- (createQName("http://www.zorba-xquery.com/modules/reference","","reference"),
412+ (createQName("http://zorba.io/modules/reference","","reference"),
413 GENV_TYPESYSTEM.STRUCTURED_ITEM_TYPE_ONE,
414 GENV_TYPESYSTEM.STRING_TYPE_ONE),
415 FunctionConsts::FN_REFERENCE_REFERENCE_1);
416@@ -89,7 +89,7 @@
417
418 {
419 DECL_WITH_KIND(sctx, fn_reference_has_reference,
420- (createQName("http://www.zorba-xquery.com/modules/reference","","has-reference"),
421+ (createQName("http://zorba.io/modules/reference","","has-reference"),
422 GENV_TYPESYSTEM.STRUCTURED_ITEM_TYPE_ONE,
423 GENV_TYPESYSTEM.BOOLEAN_TYPE_ONE),
424 FunctionConsts::FN_REFERENCE_HAS_REFERENCE_1);
425@@ -101,7 +101,7 @@
426
427 {
428 DECL_WITH_KIND(sctx, fn_reference_assign_reference,
429- (createQName("http://www.zorba-xquery.com/modules/reference","","assign-reference"),
430+ (createQName("http://zorba.io/modules/reference","","assign-reference"),
431 GENV_TYPESYSTEM.STRUCTURED_ITEM_TYPE_ONE,
432 GENV_TYPESYSTEM.STRING_TYPE_ONE,
433 GENV_TYPESYSTEM.BOOLEAN_TYPE_ONE),
434@@ -114,7 +114,7 @@
435
436 {
437 DECL_WITH_KIND(sctx, fn_reference_dereference,
438- (createQName("http://www.zorba-xquery.com/modules/reference","","dereference"),
439+ (createQName("http://zorba.io/modules/reference","","dereference"),
440 GENV_TYPESYSTEM.STRING_TYPE_ONE,
441 GENV_TYPESYSTEM.STRUCTURED_ITEM_TYPE_QUESTION),
442 FunctionConsts::FN_REFERENCE_DEREFERENCE_1);
443
444=== modified file 'src/functions/pregenerated/function_enum.h'
445--- src/functions/pregenerated/function_enum.h 2013-07-11 00:46:02 +0000
446+++ src/functions/pregenerated/function_enum.h 2013-07-24 23:57:26 +0000
447@@ -329,10 +329,6 @@
448 FN_ZORBA_POS_IN_SAME_TREE_OF_2,
449 FN_ZORBA_POS_IN_COLLECTION_1,
450 FN_ZORBA_POS_IN_SAME_COLLECTION_OF_2,
451- FN_ZORBA_REF_NODE_REFERENCE_1,
452- FN_ZORBA_REF_HAS_NODE_REFERENCE_1,
453- FN_ZORBA_REF_ASSIGN_NODE_REFERENCE_2,
454- FN_ZORBA_REF_NODE_BY_REFERENCE_1,
455 FN_LOCAL_NAME_0,
456 FN_LOCAL_NAME_1,
457 FN_NAMESPACE_URI_0,
458
459=== modified file 'src/runtime/nodes/nodes_impl.cpp'
460--- src/runtime/nodes/nodes_impl.cpp 2013-07-01 18:59:06 +0000
461+++ src/runtime/nodes/nodes_impl.cpp 2013-07-24 23:57:26 +0000
462@@ -40,113 +40,6 @@
463 namespace zorba {
464
465 /*******************************************************************************
466-
467-********************************************************************************/
468-bool
469-NodeReferenceIterator::nextImpl(store::Item_t& aResult, PlanState& aPlanState) const
470-{
471- store::Item_t lNode;
472-
473- PlanIteratorState* state;
474- DEFAULT_STACK_INIT(PlanIteratorState, state, aPlanState);
475-
476- consumeNext(lNode, theChildren[0].getp(), aPlanState);
477-
478- STACK_PUSH(GENV_STORE.getNodeReference(aResult, lNode), state);
479-
480- STACK_END (state);
481-}
482-
483-
484-/*******************************************************************************
485-
486-********************************************************************************/
487-bool
488-HasNodeReferenceIterator::nextImpl(store::Item_t& aResult, PlanState& aPlanState) const
489-{
490- store::Item_t lNode;
491- xs_boolean lHasReference;
492-
493- PlanIteratorState* state;
494- DEFAULT_STACK_INIT(PlanIteratorState, state, aPlanState);
495-
496- consumeNext(lNode, theChildren[0].getp(), aPlanState);
497-
498- lHasReference = GENV_STORE.hasReference(lNode);
499-
500- STACK_PUSH(GENV_ITEMFACTORY->createBoolean(aResult, lHasReference), state);
501-
502- STACK_END (state);
503-}
504-
505-
506-/*******************************************************************************
507-
508-********************************************************************************/
509-bool
510-AssignNodeReferenceIterator::nextImpl(store::Item_t& aResult, PlanState& aPlanState) const
511-{
512- store::Item_t lNode;
513- store::Item_t lUUID;
514- xs_boolean lHaveResult;
515-
516- PlanIteratorState* state;
517- DEFAULT_STACK_INIT(PlanIteratorState, state, aPlanState);
518-
519- consumeNext(lNode, theChildren[0].getp(), aPlanState);
520- consumeNext(lUUID, theChildren[1].getp(), aPlanState);
521- try
522- {
523- lHaveResult = GENV_STORE.assignReference(lNode, lUUID->getStringValue());
524- }
525- catch (ZorbaException& e)
526- {
527- set_source( e, loc );
528- throw;
529- }
530- STACK_PUSH(GENV_ITEMFACTORY->createBoolean(aResult, lHaveResult), state);
531-
532- STACK_END (state);
533-}
534-
535-
536-/*******************************************************************************
537-
538-********************************************************************************/
539-bool
540-NodeByReferenceIterator::nextImpl(store::Item_t& result, PlanState& planState) const
541-{
542- store::Item_t lUUID;
543- bool haveResult;
544-
545- PlanIteratorState* state;
546- DEFAULT_STACK_INIT(PlanIteratorState, state, planState);
547-
548- consumeNext(lUUID, theChildren[0].getp(), planState);
549- try
550- {
551- zstring lReference = lUUID->getStringValue();
552-
553- if (lReference.length() != 45 ||
554- !utf8::match_whole(lReference, "urn:uuid:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}"))
555- {
556- RAISE_ERROR(zerr::ZAPI0028_INVALID_NODE_URI, loc, ERROR_PARAMS(lReference));
557- }
558-
559- haveResult = GENV_STORE.getNodeByReference(result, lUUID->getStringValue());
560- }
561- catch (ZorbaException& e)
562- {
563- set_source( e, loc );
564- throw;
565- }
566- STACK_PUSH(haveResult, state);
567-
568- STACK_END (state);
569-}
570-
571-
572-/*******************************************************************************
573 14.2 fn:local-name
574 ********************************************************************************/
575 bool FnLocalNameIterator::nextImpl(store::Item_t& result, PlanState& planState) const
576
577=== modified file 'src/runtime/nodes/pregenerated/nodes.cpp'
578--- src/runtime/nodes/pregenerated/nodes.cpp 2013-03-05 23:11:50 +0000
579+++ src/runtime/nodes/pregenerated/nodes.cpp 2013-07-24 23:57:26 +0000
580@@ -32,118 +32,6 @@
581
582 namespace zorba {
583
584-// <NodeReferenceIterator>
585-SERIALIZABLE_CLASS_VERSIONS(NodeReferenceIterator)
586-
587-void NodeReferenceIterator::serialize(::zorba::serialization::Archiver& ar)
588-{
589- serialize_baseclass(ar,
590- (NaryBaseIterator<NodeReferenceIterator, PlanIteratorState>*)this);
591-}
592-
593-
594-void NodeReferenceIterator::accept(PlanIterVisitor& v) const
595-{
596- v.beginVisit(*this);
597-
598- std::vector<PlanIter_t>::const_iterator lIter = theChildren.begin();
599- std::vector<PlanIter_t>::const_iterator lEnd = theChildren.end();
600- for ( ; lIter != lEnd; ++lIter ){
601- (*lIter)->accept(v);
602- }
603-
604- v.endVisit(*this);
605-}
606-
607-NodeReferenceIterator::~NodeReferenceIterator() {}
608-
609-// </NodeReferenceIterator>
610-
611-
612-// <HasNodeReferenceIterator>
613-SERIALIZABLE_CLASS_VERSIONS(HasNodeReferenceIterator)
614-
615-void HasNodeReferenceIterator::serialize(::zorba::serialization::Archiver& ar)
616-{
617- serialize_baseclass(ar,
618- (NaryBaseIterator<HasNodeReferenceIterator, PlanIteratorState>*)this);
619-}
620-
621-
622-void HasNodeReferenceIterator::accept(PlanIterVisitor& v) const
623-{
624- v.beginVisit(*this);
625-
626- std::vector<PlanIter_t>::const_iterator lIter = theChildren.begin();
627- std::vector<PlanIter_t>::const_iterator lEnd = theChildren.end();
628- for ( ; lIter != lEnd; ++lIter ){
629- (*lIter)->accept(v);
630- }
631-
632- v.endVisit(*this);
633-}
634-
635-HasNodeReferenceIterator::~HasNodeReferenceIterator() {}
636-
637-// </HasNodeReferenceIterator>
638-
639-
640-// <AssignNodeReferenceIterator>
641-SERIALIZABLE_CLASS_VERSIONS(AssignNodeReferenceIterator)
642-
643-void AssignNodeReferenceIterator::serialize(::zorba::serialization::Archiver& ar)
644-{
645- serialize_baseclass(ar,
646- (NaryBaseIterator<AssignNodeReferenceIterator, PlanIteratorState>*)this);
647-}
648-
649-
650-void AssignNodeReferenceIterator::accept(PlanIterVisitor& v) const
651-{
652- v.beginVisit(*this);
653-
654- std::vector<PlanIter_t>::const_iterator lIter = theChildren.begin();
655- std::vector<PlanIter_t>::const_iterator lEnd = theChildren.end();
656- for ( ; lIter != lEnd; ++lIter ){
657- (*lIter)->accept(v);
658- }
659-
660- v.endVisit(*this);
661-}
662-
663-AssignNodeReferenceIterator::~AssignNodeReferenceIterator() {}
664-
665-// </AssignNodeReferenceIterator>
666-
667-
668-// <NodeByReferenceIterator>
669-SERIALIZABLE_CLASS_VERSIONS(NodeByReferenceIterator)
670-
671-void NodeByReferenceIterator::serialize(::zorba::serialization::Archiver& ar)
672-{
673- serialize_baseclass(ar,
674- (NaryBaseIterator<NodeByReferenceIterator, PlanIteratorState>*)this);
675-}
676-
677-
678-void NodeByReferenceIterator::accept(PlanIterVisitor& v) const
679-{
680- v.beginVisit(*this);
681-
682- std::vector<PlanIter_t>::const_iterator lIter = theChildren.begin();
683- std::vector<PlanIter_t>::const_iterator lEnd = theChildren.end();
684- for ( ; lIter != lEnd; ++lIter ){
685- (*lIter)->accept(v);
686- }
687-
688- v.endVisit(*this);
689-}
690-
691-NodeByReferenceIterator::~NodeByReferenceIterator() {}
692-
693-// </NodeByReferenceIterator>
694-
695-
696 // <FnLocalNameIterator>
697 SERIALIZABLE_CLASS_VERSIONS(FnLocalNameIterator)
698
699
700=== modified file 'src/runtime/nodes/pregenerated/nodes.h'
701--- src/runtime/nodes/pregenerated/nodes.h 2013-03-05 23:11:50 +0000
702+++ src/runtime/nodes/pregenerated/nodes.h 2013-07-24 23:57:26 +0000
703@@ -34,134 +34,6 @@
704 namespace zorba {
705
706 /**
707- *
708- * declare function ref:node-reference($node as node()) as xs:anyURI
709- *
710- * Author: Federico Cavalieri
711- */
712-class NodeReferenceIterator : public NaryBaseIterator<NodeReferenceIterator, PlanIteratorState>
713-{
714-public:
715- SERIALIZABLE_CLASS(NodeReferenceIterator);
716-
717- SERIALIZABLE_CLASS_CONSTRUCTOR2T(NodeReferenceIterator,
718- NaryBaseIterator<NodeReferenceIterator, PlanIteratorState>);
719-
720- void serialize( ::zorba::serialization::Archiver& ar);
721-
722- NodeReferenceIterator(
723- static_context* sctx,
724- const QueryLoc& loc,
725- std::vector<PlanIter_t>& children)
726- :
727- NaryBaseIterator<NodeReferenceIterator, PlanIteratorState>(sctx, loc, children)
728- {}
729-
730- virtual ~NodeReferenceIterator();
731-
732- void accept(PlanIterVisitor& v) const;
733-
734- bool nextImpl(store::Item_t& result, PlanState& aPlanState) const;
735-};
736-
737-
738-/**
739- *
740- * declare function ref:has-node-reference($node as node()) as xs:boolean
741- *
742- * Author: Till Westmann
743- */
744-class HasNodeReferenceIterator : public NaryBaseIterator<HasNodeReferenceIterator, PlanIteratorState>
745-{
746-public:
747- SERIALIZABLE_CLASS(HasNodeReferenceIterator);
748-
749- SERIALIZABLE_CLASS_CONSTRUCTOR2T(HasNodeReferenceIterator,
750- NaryBaseIterator<HasNodeReferenceIterator, PlanIteratorState>);
751-
752- void serialize( ::zorba::serialization::Archiver& ar);
753-
754- HasNodeReferenceIterator(
755- static_context* sctx,
756- const QueryLoc& loc,
757- std::vector<PlanIter_t>& children)
758- :
759- NaryBaseIterator<HasNodeReferenceIterator, PlanIteratorState>(sctx, loc, children)
760- {}
761-
762- virtual ~HasNodeReferenceIterator();
763-
764- void accept(PlanIterVisitor& v) const;
765-
766- bool nextImpl(store::Item_t& result, PlanState& aPlanState) const;
767-};
768-
769-
770-/**
771- *
772- * declare function ref:assign-node-reference($node as node()) as xs:boolean
773- *
774- * Author: Till Westmann
775- */
776-class AssignNodeReferenceIterator : public NaryBaseIterator<AssignNodeReferenceIterator, PlanIteratorState>
777-{
778-public:
779- SERIALIZABLE_CLASS(AssignNodeReferenceIterator);
780-
781- SERIALIZABLE_CLASS_CONSTRUCTOR2T(AssignNodeReferenceIterator,
782- NaryBaseIterator<AssignNodeReferenceIterator, PlanIteratorState>);
783-
784- void serialize( ::zorba::serialization::Archiver& ar);
785-
786- AssignNodeReferenceIterator(
787- static_context* sctx,
788- const QueryLoc& loc,
789- std::vector<PlanIter_t>& children)
790- :
791- NaryBaseIterator<AssignNodeReferenceIterator, PlanIteratorState>(sctx, loc, children)
792- {}
793-
794- virtual ~AssignNodeReferenceIterator();
795-
796- void accept(PlanIterVisitor& v) const;
797-
798- bool nextImpl(store::Item_t& result, PlanState& aPlanState) const;
799-};
800-
801-
802-/**
803- *
804- * declare function ref:node-by-reference($reference as xs:anyURI) as node()?
805- *
806- * Author: Federico Cavalieri
807- */
808-class NodeByReferenceIterator : public NaryBaseIterator<NodeByReferenceIterator, PlanIteratorState>
809-{
810-public:
811- SERIALIZABLE_CLASS(NodeByReferenceIterator);
812-
813- SERIALIZABLE_CLASS_CONSTRUCTOR2T(NodeByReferenceIterator,
814- NaryBaseIterator<NodeByReferenceIterator, PlanIteratorState>);
815-
816- void serialize( ::zorba::serialization::Archiver& ar);
817-
818- NodeByReferenceIterator(
819- static_context* sctx,
820- const QueryLoc& loc,
821- std::vector<PlanIter_t>& children)
822- :
823- NaryBaseIterator<NodeByReferenceIterator, PlanIteratorState>(sctx, loc, children)
824- {}
825-
826- virtual ~NodeByReferenceIterator();
827-
828- void accept(PlanIterVisitor& v) const;
829-
830- bool nextImpl(store::Item_t& result, PlanState& aPlanState) const;
831-};
832-
833-
834-/**
835 *
836 * fn:local-name
837 *
838
839=== modified file 'src/runtime/pregenerated/iterator_enum.h'
840--- src/runtime/pregenerated/iterator_enum.h 2013-07-11 00:46:02 +0000
841+++ src/runtime/pregenerated/iterator_enum.h 2013-07-24 23:57:26 +0000
842@@ -237,10 +237,6 @@
843 TYPE_InSameTreePositionIterator,
844 TYPE_InCollectionPositionIterator,
845 TYPE_InSameCollectionPositionIterator,
846- TYPE_NodeReferenceIterator,
847- TYPE_HasNodeReferenceIterator,
848- TYPE_AssignNodeReferenceIterator,
849- TYPE_NodeByReferenceIterator,
850 TYPE_FnLocalNameIterator,
851 TYPE_FnNamespaceUriIterator,
852 TYPE_FnLangIterator,
853
854=== modified file 'src/runtime/spec/mappings.xml'
855--- src/runtime/spec/mappings.xml 2013-07-17 15:48:38 +0000
856+++ src/runtime/spec/mappings.xml 2013-07-24 23:57:26 +0000
857@@ -20,11 +20,7 @@
858 define="ZORBA_BASE64_FN_NS"
859 prefix="fn-zorba-base64"/>
860
861- <zorba:namespace uri="http://www.zorba-xquery.com/modules/node-reference"
862- define="ZORBA_NODEREF_FN_NS"
863- prefix="fn-zorba-ref"/>
864-
865- <zorba:namespace uri="http://www.zorba-xquery.com/modules/reference"
866+ <zorba:namespace uri="http://zorba.io/modules/reference"
867 define="ZORBA_REF_FN_NS"
868 prefix="fn-reference"/>
869
870
871=== modified file 'src/runtime/spec/nodes/nodes.xml'
872--- src/runtime/spec/nodes/nodes.xml 2013-02-07 17:24:36 +0000
873+++ src/runtime/spec/nodes/nodes.xml 2013-07-24 23:57:26 +0000
874@@ -16,99 +16,6 @@
875 /*******************************************************************************
876 ********************************************************************************/
877 -->
878- <zorba:iterator name="NodeReferenceIterator">
879-
880- <zorba:description author="Federico Cavalieri">
881- declare function ref:node-reference($node as node()) as xs:anyURI
882- </zorba:description>
883-
884- <zorba:function>
885-
886- <zorba:signature localname="node-reference" prefix="fn-zorba-ref">
887- <zorba:param>node()</zorba:param>
888- <zorba:output>xs:anyURI</zorba:output>
889- </zorba:signature>
890-
891- <zorba:methods>
892- <zorba:mustCopyInputNodes value="true"/>
893- </zorba:methods>
894-
895- </zorba:function>
896-
897- </zorba:iterator>
898-
899-<!--
900-/*******************************************************************************
901-********************************************************************************/
902--->
903- <zorba:iterator name="HasNodeReferenceIterator">
904-
905- <zorba:description author="Till Westmann">
906- declare function ref:has-node-reference($node as node()) as xs:boolean
907- </zorba:description>
908-
909- <zorba:function>
910-
911- <zorba:signature localname="has-node-reference" prefix="fn-zorba-ref">
912- <zorba:param>node()</zorba:param>
913- <zorba:output>xs:boolean</zorba:output>
914- </zorba:signature>
915-
916- </zorba:function>
917-
918- </zorba:iterator>
919-
920-<!--
921-/*******************************************************************************
922-********************************************************************************/
923--->
924- <zorba:iterator name="AssignNodeReferenceIterator">
925-
926- <zorba:description author="Till Westmann">
927- declare function ref:assign-node-reference($node as node()) as xs:boolean
928- </zorba:description>
929-
930- <zorba:function>
931-
932- <zorba:signature localname="assign-node-reference" prefix="fn-zorba-ref">
933- <zorba:param>node()</zorba:param>
934- <zorba:param>xs:anyURI</zorba:param>
935- <zorba:output>xs:boolean</zorba:output>
936- </zorba:signature>
937-
938- <zorba:methods>
939- <zorba:getScriptingKind returnValue="SEQUENTIAL_FUNC_EXPR"/>
940- </zorba:methods>
941-
942- </zorba:function>
943-
944- </zorba:iterator>
945-
946-<!--
947-/*******************************************************************************
948-********************************************************************************/
949--->
950- <zorba:iterator name="NodeByReferenceIterator">
951-
952- <zorba:description author="Federico Cavalieri">
953- declare function ref:node-by-reference($reference as xs:anyURI) as node()?
954- </zorba:description>
955-
956- <zorba:function>
957-
958- <zorba:signature localname="node-by-reference" prefix="fn-zorba-ref">
959- <zorba:param>xs:anyURI</zorba:param>
960- <zorba:output>node()?</zorba:output>
961- </zorba:signature>
962-
963- </zorba:function>
964-
965- </zorba:iterator>
966-
967-<!--
968-/*******************************************************************************
969-********************************************************************************/
970--->
971 <zorba:iterator name="FnLocalNameIterator">
972
973 <zorba:description author="Zorba Team">
974
975=== modified file 'src/runtime/visitors/pregenerated/planiter_visitor.h'
976--- src/runtime/visitors/pregenerated/planiter_visitor.h 2013-07-11 00:46:02 +0000
977+++ src/runtime/visitors/pregenerated/planiter_visitor.h 2013-07-24 23:57:26 +0000
978@@ -480,14 +480,6 @@
979
980 class InSameCollectionPositionIterator;
981
982- class NodeReferenceIterator;
983-
984- class HasNodeReferenceIterator;
985-
986- class AssignNodeReferenceIterator;
987-
988- class NodeByReferenceIterator;
989-
990 class FnLocalNameIterator;
991
992 class FnNamespaceUriIterator;
993@@ -1432,18 +1424,6 @@
994 virtual void beginVisit ( const InSameCollectionPositionIterator& ) = 0;
995 virtual void endVisit ( const InSameCollectionPositionIterator& ) = 0;
996
997- virtual void beginVisit ( const NodeReferenceIterator& ) = 0;
998- virtual void endVisit ( const NodeReferenceIterator& ) = 0;
999-
1000- virtual void beginVisit ( const HasNodeReferenceIterator& ) = 0;
1001- virtual void endVisit ( const HasNodeReferenceIterator& ) = 0;
1002-
1003- virtual void beginVisit ( const AssignNodeReferenceIterator& ) = 0;
1004- virtual void endVisit ( const AssignNodeReferenceIterator& ) = 0;
1005-
1006- virtual void beginVisit ( const NodeByReferenceIterator& ) = 0;
1007- virtual void endVisit ( const NodeByReferenceIterator& ) = 0;
1008-
1009 virtual void beginVisit ( const FnLocalNameIterator& ) = 0;
1010 virtual void endVisit ( const FnLocalNameIterator& ) = 0;
1011
1012
1013=== modified file 'src/runtime/visitors/pregenerated/printer_visitor.cpp'
1014--- src/runtime/visitors/pregenerated/printer_visitor.cpp 2013-07-11 00:46:02 +0000
1015+++ src/runtime/visitors/pregenerated/printer_visitor.cpp 2013-07-24 23:57:26 +0000
1016@@ -3035,62 +3035,6 @@
1017 // </InSameCollectionPositionIterator>
1018
1019
1020-// <NodeReferenceIterator>
1021-void PrinterVisitor::beginVisit ( const NodeReferenceIterator& a) {
1022- thePrinter.startBeginVisit("NodeReferenceIterator", ++theId);
1023- printCommons( &a, theId );
1024- thePrinter.endBeginVisit( theId );
1025-}
1026-
1027-void PrinterVisitor::endVisit ( const NodeReferenceIterator& ) {
1028- thePrinter.startEndVisit();
1029- thePrinter.endEndVisit();
1030-}
1031-// </NodeReferenceIterator>
1032-
1033-
1034-// <HasNodeReferenceIterator>
1035-void PrinterVisitor::beginVisit ( const HasNodeReferenceIterator& a) {
1036- thePrinter.startBeginVisit("HasNodeReferenceIterator", ++theId);
1037- printCommons( &a, theId );
1038- thePrinter.endBeginVisit( theId );
1039-}
1040-
1041-void PrinterVisitor::endVisit ( const HasNodeReferenceIterator& ) {
1042- thePrinter.startEndVisit();
1043- thePrinter.endEndVisit();
1044-}
1045-// </HasNodeReferenceIterator>
1046-
1047-
1048-// <AssignNodeReferenceIterator>
1049-void PrinterVisitor::beginVisit ( const AssignNodeReferenceIterator& a) {
1050- thePrinter.startBeginVisit("AssignNodeReferenceIterator", ++theId);
1051- printCommons( &a, theId );
1052- thePrinter.endBeginVisit( theId );
1053-}
1054-
1055-void PrinterVisitor::endVisit ( const AssignNodeReferenceIterator& ) {
1056- thePrinter.startEndVisit();
1057- thePrinter.endEndVisit();
1058-}
1059-// </AssignNodeReferenceIterator>
1060-
1061-
1062-// <NodeByReferenceIterator>
1063-void PrinterVisitor::beginVisit ( const NodeByReferenceIterator& a) {
1064- thePrinter.startBeginVisit("NodeByReferenceIterator", ++theId);
1065- printCommons( &a, theId );
1066- thePrinter.endBeginVisit( theId );
1067-}
1068-
1069-void PrinterVisitor::endVisit ( const NodeByReferenceIterator& ) {
1070- thePrinter.startEndVisit();
1071- thePrinter.endEndVisit();
1072-}
1073-// </NodeByReferenceIterator>
1074-
1075-
1076 // <FnLocalNameIterator>
1077 void PrinterVisitor::beginVisit ( const FnLocalNameIterator& a) {
1078 thePrinter.startBeginVisit("FnLocalNameIterator", ++theId);
1079
1080=== modified file 'src/runtime/visitors/pregenerated/printer_visitor.h'
1081--- src/runtime/visitors/pregenerated/printer_visitor.h 2013-07-11 00:46:02 +0000
1082+++ src/runtime/visitors/pregenerated/printer_visitor.h 2013-07-24 23:57:26 +0000
1083@@ -730,18 +730,6 @@
1084 void beginVisit( const InSameCollectionPositionIterator& );
1085 void endVisit ( const InSameCollectionPositionIterator& );
1086
1087- void beginVisit( const NodeReferenceIterator& );
1088- void endVisit ( const NodeReferenceIterator& );
1089-
1090- void beginVisit( const HasNodeReferenceIterator& );
1091- void endVisit ( const HasNodeReferenceIterator& );
1092-
1093- void beginVisit( const AssignNodeReferenceIterator& );
1094- void endVisit ( const AssignNodeReferenceIterator& );
1095-
1096- void beginVisit( const NodeByReferenceIterator& );
1097- void endVisit ( const NodeByReferenceIterator& );
1098-
1099 void beginVisit( const FnLocalNameIterator& );
1100 void endVisit ( const FnLocalNameIterator& );
1101
1102
1103=== modified file 'test/rbkt/Queries/zorba/collections/dynamic_node_ref1.xq'
1104--- test/rbkt/Queries/zorba/collections/dynamic_node_ref1.xq 2013-02-07 17:24:36 +0000
1105+++ test/rbkt/Queries/zorba/collections/dynamic_node_ref1.xq 2013-07-24 23:57:26 +0000
1106@@ -1,7 +1,7 @@
1107 import module namespace ddl = "http://www.zorba-xquery.com/modules/store/dynamic/collections/ddl";
1108 import module namespace dml = "http://www.zorba-xquery.com/modules/store/dynamic/collections/dml";
1109-import module namespace ref = "http://www.zorba-xquery.com/modules/node-reference";
1110+import module namespace ref = "http://zorba.io/modules/reference";
1111
1112 ddl:create(xs:QName("ddl:bar"));
1113 let $x := dml:apply-insert-nodes-last(xs:QName("ddl:bar"), <a>1</a>)
1114-return ref:node-by-reference(ref:node-reference($x))
1115+return ref:dereference(ref:reference($x))
1116
1117=== modified file 'test/rbkt/Queries/zorba/collections/edit/edit_collection_005.xq'
1118--- test/rbkt/Queries/zorba/collections/edit/edit_collection_005.xq 2013-04-08 08:39:10 +0000
1119+++ test/rbkt/Queries/zorba/collections/edit/edit_collection_005.xq 2013-07-24 23:57:26 +0000
1120@@ -1,6 +1,6 @@
1121 import module namespace ddl = "http://www.zorba-xquery.com/modules/store/static/collections/ddl";
1122 import module namespace dml = "http://www.zorba-xquery.com/modules/store/static/collections/dml";
1123-import module namespace ref = "http://www.zorba-xquery.com/modules/node-reference";
1124+import module namespace ref = "http://zorba.io/modules/reference";
1125
1126 import module namespace ns = "http://www.example.com/example" at "../collection_001.xqdata";
1127
1128@@ -8,10 +8,10 @@
1129
1130 dml:insert(xs:QName("ns:collection"), (<a/>, <b/>, <c/>));
1131
1132-variable $old := ref:node-reference(dml:collection(xs:QName("ns:collection"))[2]);
1133+variable $old := ref:reference(dml:collection(xs:QName("ns:collection"))[2]);
1134
1135 dml:edit(dml:collection(xs:QName("ns:collection"))[2], <d/>);
1136
1137-variable $new := ref:node-reference(dml:collection(xs:QName("ns:collection"))[2]);
1138+variable $new := ref:reference(dml:collection(xs:QName("ns:collection"))[2]);
1139
1140 $old eq $new
1141
1142=== modified file 'test/rbkt/Queries/zorba/collections/edit/edit_collection_006.xq'
1143--- test/rbkt/Queries/zorba/collections/edit/edit_collection_006.xq 2012-12-10 16:04:40 +0000
1144+++ test/rbkt/Queries/zorba/collections/edit/edit_collection_006.xq 2013-07-24 23:57:26 +0000
1145@@ -1,6 +1,6 @@
1146 import module namespace ddl = "http://www.zorba-xquery.com/modules/store/static/collections/ddl";
1147 import module namespace dml = "http://www.zorba-xquery.com/modules/store/static/collections/dml";
1148-import module namespace ref = "http://www.zorba-xquery.com/modules/node-reference";
1149+import module namespace ref = "http://zorba.io/modules/reference";
1150
1151 import module namespace ns = "http://www.example.com/example" at "../collection_001.xqdata";
1152
1153
1154=== modified file 'test/rbkt/Queries/zorba/collections/edit/edit_collection_007.xq'
1155--- test/rbkt/Queries/zorba/collections/edit/edit_collection_007.xq 2012-12-10 16:04:40 +0000
1156+++ test/rbkt/Queries/zorba/collections/edit/edit_collection_007.xq 2013-07-24 23:57:26 +0000
1157@@ -2,7 +2,7 @@
1158 import module namespace dml = "http://www.zorba-xquery.com/modules/store/static/collections/dml";
1159 import module namespace index_ddl = "http://www.zorba-xquery.com/modules/store/static/indexes/ddl";
1160 import module namespace index_dml = "http://www.zorba-xquery.com/modules/store/static/indexes/dml";
1161-import module namespace ref = "http://www.zorba-xquery.com/modules/node-reference";
1162+import module namespace ref = "http://zorba.io/modules/reference";
1163
1164 import module namespace ns = "http://www.example.com/example" at "collection_with_index.xqdata";
1165
1166
1167=== modified file 'test/rbkt/Queries/zorba/collections/edit/edit_collection_008.xq'
1168--- test/rbkt/Queries/zorba/collections/edit/edit_collection_008.xq 2012-12-10 16:04:40 +0000
1169+++ test/rbkt/Queries/zorba/collections/edit/edit_collection_008.xq 2013-07-24 23:57:26 +0000
1170@@ -2,7 +2,7 @@
1171 import module namespace dml = "http://www.zorba-xquery.com/modules/store/static/collections/dml";
1172 import module namespace index_ddl = "http://www.zorba-xquery.com/modules/store/static/indexes/ddl";
1173 import module namespace index_dml = "http://www.zorba-xquery.com/modules/store/static/indexes/dml";
1174-import module namespace ref = "http://www.zorba-xquery.com/modules/node-reference";
1175+import module namespace ref = "http://zorba.io/modules/reference";
1176
1177 import module namespace ns = "http://www.example.com/example" at "../collection_001.xqdata";
1178
1179
1180=== modified file 'test/rbkt/Queries/zorba/collections/edit/edit_collection_009.xq'
1181--- test/rbkt/Queries/zorba/collections/edit/edit_collection_009.xq 2012-12-10 16:04:40 +0000
1182+++ test/rbkt/Queries/zorba/collections/edit/edit_collection_009.xq 2013-07-24 23:57:26 +0000
1183@@ -2,7 +2,7 @@
1184 import module namespace dml = "http://www.zorba-xquery.com/modules/store/static/collections/dml";
1185 import module namespace index_ddl = "http://www.zorba-xquery.com/modules/store/static/indexes/ddl";
1186 import module namespace index_dml = "http://www.zorba-xquery.com/modules/store/static/indexes/dml";
1187-import module namespace ref = "http://www.zorba-xquery.com/modules/node-reference";
1188+import module namespace ref = "http://zorba.io/modules/reference";
1189
1190 import module namespace ns = "http://www.example.com/example" at "../collection_001.xqdata";
1191
1192
1193=== modified file 'test/rbkt/Queries/zorba/collections/edit/edit_collection_010.xq'
1194--- test/rbkt/Queries/zorba/collections/edit/edit_collection_010.xq 2012-12-10 16:52:21 +0000
1195+++ test/rbkt/Queries/zorba/collections/edit/edit_collection_010.xq 2013-07-24 23:57:26 +0000
1196@@ -2,7 +2,7 @@
1197 import module namespace dml = "http://www.zorba-xquery.com/modules/store/static/collections/dml";
1198 import module namespace index_ddl = "http://www.zorba-xquery.com/modules/store/static/indexes/ddl";
1199 import module namespace index_dml = "http://www.zorba-xquery.com/modules/store/static/indexes/dml";
1200-import module namespace ref = "http://www.zorba-xquery.com/modules/node-reference";
1201+import module namespace ref = "http://zorba.io/modules/reference";
1202
1203 import module namespace ns = "http://www.example.com/example" at "../collection_001.xqdata";
1204
1205
1206=== modified file 'test/rbkt/Queries/zorba/collections/paging_1.xq'
1207--- test/rbkt/Queries/zorba/collections/paging_1.xq 2013-06-25 03:55:20 +0000
1208+++ test/rbkt/Queries/zorba/collections/paging_1.xq 2013-07-24 23:57:26 +0000
1209@@ -1,7 +1,7 @@
1210 import module namespace ddl = "http://www.zorba-xquery.com/modules/store/static/collections/ddl";
1211 import module namespace dml = "http://www.zorba-xquery.com/modules/store/static/collections/dml";
1212 import module namespace ns = "http://example.org/datamodule/" at "collections.xqdata";
1213-import module namespace ref = "http://www.zorba-xquery.com/modules/node-reference";
1214+import module namespace ref = "http://zorba.io/modules/reference";
1215
1216 declare namespace ann = "http://www.zorba-xquery.com/annotations";
1217 declare namespace zerr = "http://zorba.io/modules/zorba-errors";
1218@@ -34,7 +34,7 @@
1219 (
1220 local:order(dml:collection(xs:QName("ns:test2"), 3)), <delim/>,
1221 local:order(dml:collection(xs:QName("ns:test2"), -1)), <delim/>,
1222- let $ref := ref:node-reference(dml:collection(xs:QName("ns:test2"))[3])
1223+ let $ref := ref:reference(dml:collection(xs:QName("ns:test2"))[3])
1224 return local:order(dml:collection(xs:QName("ns:test2"), $ref, 0))
1225 )
1226 };
1227
1228=== modified file 'test/rbkt/Queries/zorba/collections/paging_2.xq'
1229--- test/rbkt/Queries/zorba/collections/paging_2.xq 2013-02-07 17:24:36 +0000
1230+++ test/rbkt/Queries/zorba/collections/paging_2.xq 2013-07-24 23:57:26 +0000
1231@@ -1,7 +1,7 @@
1232 import module namespace ddl = "http://www.zorba-xquery.com/modules/store/static/collections/ddl";
1233 import module namespace dml = "http://www.zorba-xquery.com/modules/store/static/collections/dml";
1234 import module namespace ns = "http://example.org/datamodule/" at "collections.xqdata";
1235-import module namespace ref = "http://www.zorba-xquery.com/modules/node-reference";
1236+import module namespace ref = "http://zorba.io/modules/reference";
1237
1238 declare namespace ann = "http://www.zorba-xquery.com/annotations";
1239
1240@@ -15,7 +15,7 @@
1241 fn:count(dml:collection(xs:QName("ns:test2"), 3)),
1242 fn:count(dml:collection(xs:QName("ns:test2"), -1)),
1243 fn:count(dml:collection(xs:QName("ns:test2"), 100)),
1244- let $ref := ref:node-reference(dml:collection(xs:QName("ns:test2"))[3])
1245+ let $ref := ref:reference(dml:collection(xs:QName("ns:test2"))[3])
1246 return fn:count(dml:collection(xs:QName("ns:test2"), $ref, 0))
1247 )
1248 };
1249
1250=== modified file 'test/rbkt/Queries/zorba/collections/paging_3.xq'
1251--- test/rbkt/Queries/zorba/collections/paging_3.xq 2013-02-07 17:24:36 +0000
1252+++ test/rbkt/Queries/zorba/collections/paging_3.xq 2013-07-24 23:57:26 +0000
1253@@ -1,6 +1,6 @@
1254 import module namespace ddl = "http://www.zorba-xquery.com/modules/store/dynamic/collections/ddl";
1255 import module namespace dml = "http://www.zorba-xquery.com/modules/store/dynamic/collections/dml";
1256-import module namespace ref = "http://www.zorba-xquery.com/modules/node-reference";
1257+import module namespace ref = "http://zorba.io/modules/reference";
1258
1259 declare namespace ann = "http://www.zorba-xquery.com/annotations";
1260 declare namespace ns = "http://www.zorba-xquery.com/test";
1261@@ -14,7 +14,7 @@
1262 (
1263 dml:collection(xs:QName("ns:test2"), 3), <delim/>,
1264 dml:collection(xs:QName("ns:test2"), -1), <delim/>,
1265- let $ref := ref:node-reference(dml:collection(xs:QName("ns:test2"))[3])
1266+ let $ref := ref:reference(dml:collection(xs:QName("ns:test2"))[3])
1267 return dml:collection(xs:QName("ns:test2"), $ref, 0)
1268 )
1269 };
1270
1271=== modified file 'test/rbkt/Queries/zorba/collections/paging_4.xq'
1272--- test/rbkt/Queries/zorba/collections/paging_4.xq 2013-02-07 17:24:36 +0000
1273+++ test/rbkt/Queries/zorba/collections/paging_4.xq 2013-07-24 23:57:26 +0000
1274@@ -1,6 +1,6 @@
1275 import module namespace ddl = "http://www.zorba-xquery.com/modules/store/dynamic/collections/ddl";
1276 import module namespace dml = "http://www.zorba-xquery.com/modules/store/dynamic/collections/dml";
1277-import module namespace ref = "http://www.zorba-xquery.com/modules/node-reference";
1278+import module namespace ref = "http://zorba.io/modules/reference";
1279
1280 declare namespace ann = "http://www.zorba-xquery.com/annotations";
1281 declare namespace ns = "http://www.zorba-xquery.com/test";
1282@@ -15,7 +15,7 @@
1283 fn:count(dml:collection(xs:QName("ns:test2"), 3)),
1284 fn:count(dml:collection(xs:QName("ns:test2"), -1)),
1285 fn:count(dml:collection(xs:QName("ns:test2"), 100)),
1286- let $ref := ref:node-reference(dml:collection(xs:QName("ns:test2"))[3])
1287+ let $ref := ref:reference(dml:collection(xs:QName("ns:test2"))[3])
1288 return fn:count(dml:collection(xs:QName("ns:test2"), $ref, 0))
1289 )
1290 };
1291
1292=== modified file 'test/rbkt/Queries/zorba/collections/paging_5.xq'
1293--- test/rbkt/Queries/zorba/collections/paging_5.xq 2012-09-06 09:36:25 +0000
1294+++ test/rbkt/Queries/zorba/collections/paging_5.xq 2013-07-24 23:57:26 +0000
1295@@ -1,6 +1,6 @@
1296 import module namespace ddl = "http://www.zorba-xquery.com/modules/store/dynamic/collections/ddl";
1297 import module namespace dml = "http://www.zorba-xquery.com/modules/store/dynamic/collections/dml";
1298-import module namespace ref = "http://www.zorba-xquery.com/modules/node-reference";
1299+import module namespace ref = "http://zorba.io/modules/reference";
1300
1301 declare namespace ann = "http://www.zorba-xquery.com/annotations";
1302 declare namespace ns = "http://www.zorba-xquery.com/test";
1303
1304=== modified file 'test/rbkt/Queries/zorba/fulltext/ft-module-tokenize-node-3.xq'
1305--- test/rbkt/Queries/zorba/fulltext/ft-module-tokenize-node-3.xq 2013-06-27 23:29:20 +0000
1306+++ test/rbkt/Queries/zorba/fulltext/ft-module-tokenize-node-3.xq 2013-07-24 23:57:26 +0000
1307@@ -1,12 +1,12 @@
1308 jsoniq version "1.0";
1309
1310 import module namespace ft = "http://zorba.io/modules/full-text";
1311-import module namespace ref = "http://www.zorba-xquery.com/modules/node-reference";
1312+import module namespace ref = "http://zorba.io/modules/reference";
1313
1314 let $x := <p xml:lang="en">Houston, we have a <em>problem</em>!</p>
1315 let $tokens := ft:tokenize-node( $x )
1316 let $node-ref := $tokens[5].node-ref
1317-let $node := ref:node-by-reference( $node-ref )
1318+let $node := ref:dereference( $node-ref )
1319 return $node instance of text()
1320
1321 (: vim:set et sw=2 ts=2: :)
1322
1323=== modified file 'test/rbkt/Queries/zorba/fulltext/ft-module-tokenize-node-4.xq'
1324--- test/rbkt/Queries/zorba/fulltext/ft-module-tokenize-node-4.xq 2013-06-27 23:29:20 +0000
1325+++ test/rbkt/Queries/zorba/fulltext/ft-module-tokenize-node-4.xq 2013-07-24 23:57:26 +0000
1326@@ -1,12 +1,12 @@
1327 jsoniq version "1.0";
1328
1329 import module namespace ft = "http://zorba.io/modules/full-text";
1330-import module namespace ref = "http://www.zorba-xquery.com/modules/node-reference";
1331+import module namespace ref = "http://zorba.io/modules/reference";
1332
1333 let $x := <msg xml:lang="en" content="Houston, we have a problem!"/>
1334 let $tokens := ft:tokenize-node( $x/@content )
1335 let $node-ref := $tokens[5].node-ref
1336-let $node := ref:node-by-reference( $node-ref )
1337+let $node := ref:dereference( $node-ref )
1338 return $node instance of attribute(content)
1339
1340 (: vim:set et sw=2 ts=2: :)
1341
1342=== modified file 'test/rbkt/Queries/zorba/paths/ref1.xq'
1343--- test/rbkt/Queries/zorba/paths/ref1.xq 2013-02-07 17:24:36 +0000
1344+++ test/rbkt/Queries/zorba/paths/ref1.xq 2013-07-24 23:57:26 +0000
1345@@ -1,8 +1,8 @@
1346-import module namespace zorba = "http://www.zorba-xquery.com/modules/node-reference";
1347+import module namespace zorba = "http://zorba.io/modules/reference";
1348
1349 declare variable $input-context external;
1350
1351 let $persons := doc($input-context)/site/people
1352 for $person in $persons
1353-return zorba:node-by-reference(zorba:node-reference($person))
1354+return zorba:dereference(zorba:reference($person))
1355
1356
1357=== modified file 'test/rbkt/Queries/zorba/reference/json-reference_1.xq'
1358--- test/rbkt/Queries/zorba/reference/json-reference_1.xq 2012-12-06 00:01:20 +0000
1359+++ test/rbkt/Queries/zorba/reference/json-reference_1.xq 2013-07-24 23:57:26 +0000
1360@@ -1,4 +1,4 @@
1361-import module namespace id = "http://www.zorba-xquery.com/modules/reference";
1362+import module namespace id = "http://zorba.io/modules/reference";
1363
1364 variable $node := { "foo" : "bar" };
1365
1366
1367=== modified file 'test/rbkt/Queries/zorba/reference/json-reference_2.xq'
1368--- test/rbkt/Queries/zorba/reference/json-reference_2.xq 2012-12-06 00:01:20 +0000
1369+++ test/rbkt/Queries/zorba/reference/json-reference_2.xq 2013-07-24 23:57:26 +0000
1370@@ -1,3 +1,3 @@
1371-import module namespace id = "http://www.zorba-xquery.com/modules/reference";
1372+import module namespace id = "http://zorba.io/modules/reference";
1373
1374 id:dereference(xs:anyURI("this:is-not-a-reference"))
1375
1376=== modified file 'test/rbkt/Queries/zorba/reference/json-reference_3.xq'
1377--- test/rbkt/Queries/zorba/reference/json-reference_3.xq 2012-12-06 00:01:20 +0000
1378+++ test/rbkt/Queries/zorba/reference/json-reference_3.xq 2013-07-24 23:57:26 +0000
1379@@ -1,7 +1,7 @@
1380 import module namespace ddl = "http://www.zorba-xquery.com/modules/store/dynamic/collections/ddl";
1381 import module namespace dml = "http://www.zorba-xquery.com/modules/store/dynamic/collections/dml";
1382
1383-import module namespace ref = "http://www.zorba-xquery.com/modules/reference";
1384+import module namespace ref = "http://zorba.io/modules/reference";
1385
1386 declare namespace ann = "http://www.zorba-xquery.com/annotations";
1387
1388
1389=== modified file 'test/rbkt/Queries/zorba/reference/json-reference_4.xq'
1390--- test/rbkt/Queries/zorba/reference/json-reference_4.xq 2012-12-06 00:01:20 +0000
1391+++ test/rbkt/Queries/zorba/reference/json-reference_4.xq 2013-07-24 23:57:26 +0000
1392@@ -2,7 +2,7 @@
1393 import module namespace dml = "http://www.zorba-xquery.com/modules/store/dynamic/collections/dml";
1394 import module namespace ns = "http://example.org/datamodule/" at "collections.xqdata";
1395
1396-import module namespace ref = "http://www.zorba-xquery.com/modules/reference";
1397+import module namespace ref = "http://zorba.io/modules/reference";
1398
1399 declare namespace ann = "http://www.zorba-xquery.com/annotations";
1400
1401
1402=== modified file 'test/rbkt/Queries/zorba/reference/json-reference_5.xq'
1403--- test/rbkt/Queries/zorba/reference/json-reference_5.xq 2012-12-06 00:02:42 +0000
1404+++ test/rbkt/Queries/zorba/reference/json-reference_5.xq 2013-07-24 23:57:26 +0000
1405@@ -1,7 +1,7 @@
1406 import module namespace ddl = "http://www.zorba-xquery.com/modules/store/dynamic/collections/ddl";
1407 import module namespace dml = "http://www.zorba-xquery.com/modules/store/dynamic/collections/dml";
1408
1409-import module namespace ref = "http://www.zorba-xquery.com/modules/reference";
1410+import module namespace ref = "http://zorba.io/modules/reference";
1411
1412 declare namespace ann = "http://www.zorba-xquery.com/annotations";
1413
1414
1415=== modified file 'test/rbkt/Queries/zorba/reference/reference.xqlib'
1416--- test/rbkt/Queries/zorba/reference/reference.xqlib 2013-02-07 17:24:36 +0000
1417+++ test/rbkt/Queries/zorba/reference/reference.xqlib 2013-07-24 23:57:26 +0000
1418@@ -1,3 +1,3 @@
1419-module namespace idd= "http://www.zorba-xquery.com/reference";
1420+module namespace idd= "http://zorba.io/reference";
1421
1422 declare variable $idd:node:=<root>reference.xqlib</root>;
1423
1424=== modified file 'test/rbkt/Queries/zorba/reference/reference_1.xq'
1425--- test/rbkt/Queries/zorba/reference/reference_1.xq 2013-02-07 17:24:36 +0000
1426+++ test/rbkt/Queries/zorba/reference/reference_1.xq 2013-07-24 23:57:26 +0000
1427@@ -1,10 +1,10 @@
1428-import module namespace id = "http://www.zorba-xquery.com/modules/node-reference";
1429+import module namespace id = "http://zorba.io/modules/reference";
1430
1431 variable $node:=<root><child>text</child></root>;
1432
1433-variable $before-currentid:=id:node-reference($node);
1434-variable $got:=id:node-reference($node);
1435-variable $after:=id:node-reference($node);
1436+variable $before-currentid:=id:reference($node);
1437+variable $got:=id:reference($node);
1438+variable $after:=id:reference($node);
1439
1440 <result>
1441 <before>{fn:string-length($before-currentid)}</before>
1442
1443=== modified file 'test/rbkt/Queries/zorba/reference/reference_2.xq'
1444--- test/rbkt/Queries/zorba/reference/reference_2.xq 2013-02-07 17:24:36 +0000
1445+++ test/rbkt/Queries/zorba/reference/reference_2.xq 2013-07-24 23:57:26 +0000
1446@@ -1,4 +1,4 @@
1447-import module namespace id = "http://www.zorba-xquery.com/modules/node-reference";
1448+import module namespace id = "http://zorba.io/modules/reference";
1449
1450 variable $el:=element {"elem"}{"elem"};
1451 variable $attr:=attribute{"attr"}{"attr"};
1452@@ -7,8 +7,8 @@
1453 variable $doc:=document {"document"};
1454
1455
1456-id:node-by-reference(id:node-reference($el)),
1457-element {"attr"}{id:node-by-reference(id:node-reference($attr))},
1458-id:node-by-reference(id:node-reference($pi)),
1459-id:node-by-reference(id:node-reference($comm)),
1460-id:node-by-reference(id:node-reference($doc))
1461\ No newline at end of file
1462+id:dereference(id:reference($el)),
1463+element {"attr"}{id:dereference(id:reference($attr))},
1464+id:dereference(id:reference($pi)),
1465+id:dereference(id:reference($comm)),
1466+id:dereference(id:reference($doc))
1467\ No newline at end of file
1468
1469=== modified file 'test/rbkt/Queries/zorba/reference/reference_3.xq'
1470--- test/rbkt/Queries/zorba/reference/reference_3.xq 2013-02-07 17:24:36 +0000
1471+++ test/rbkt/Queries/zorba/reference/reference_3.xq 2013-07-24 23:57:26 +0000
1472@@ -1,5 +1,5 @@
1473-import module namespace idd = "http://www.zorba-xquery.com/reference" at "reference.xqlib";
1474-import module namespace id = "http://www.zorba-xquery.com/modules/node-reference";
1475+import module namespace idd = "http://zorba.io/reference" at "reference.xqlib";
1476+import module namespace id = "http://zorba.io/modules/reference";
1477 import module namespace doc = "http://www.zorba-xquery.com/modules/store/dynamic/documents";
1478 import module namespace map = "http://www.zorba-xquery.com/modules/store/data-structures/unordered-map";
1479
1480@@ -8,26 +8,26 @@
1481 fn:put(<root>doc</root>,"doc");
1482
1483 map:create(xs:QName("local:bar"), xs:QName("xs:integer"));
1484-map:insert(xs:QName("local:bar"), id:node-reference($x), 1);
1485+map:insert(xs:QName("local:bar"), id:reference($x), 1);
1486
1487
1488
1489 <result>
1490-<out-of-module-global>{id:node-by-reference(id:node-reference($idd:node))}</out-of-module-global>
1491-<put-doc>{id:node-by-reference(id:node-reference(doc:document("doc")))}</put-doc>
1492-<in-scope>{id:node-by-reference(id:node-reference($node))}</in-scope>
1493+<out-of-module-global>{id:dereference(id:reference($idd:node))}</out-of-module-global>
1494+<put-doc>{id:dereference(id:reference(doc:document("doc")))}</put-doc>
1495+<in-scope>{id:dereference(id:reference($node))}</in-scope>
1496
1497-<temporary-variable-out-of-scope>{id:node-by-reference(id:node-reference(<root>temp</root>))}</temporary-variable-out-of-scope>
1498+<temporary-variable-out-of-scope>{id:dereference(id:reference(<root>temp</root>))}</temporary-variable-out-of-scope>
1499 <temporary-variable-in-scope>{
1500 for $i in (1 to 3)
1501 let $temp:=<root>{$i}</root>
1502 where string($temp) = string($i)
1503-let $ref:=id:node-reference($temp)
1504+let $ref:=id:reference($temp)
1505 return
1506-id:node-by-reference($ref)
1507+id:dereference($ref)
1508 }</temporary-variable-in-scope>
1509-<temporary-variable-in-scope>{variable $temp:=<root>temp</root>; id:node-by-reference(id:node-reference($temp))}</temporary-variable-in-scope>
1510+<temporary-variable-in-scope>{variable $temp:=<root>temp</root>; id:dereference(id:reference($temp))}</temporary-variable-in-scope>
1511 <in-map>
1512-{id:node-by-reference(map:get(xs:QName("local:bar"), 1))}
1513+{id:dereference(map:get(xs:QName("local:bar"), 1))}
1514 </in-map>
1515 </result>
1516\ No newline at end of file
1517
1518=== modified file 'test/rbkt/Queries/zorba/reference/reference_4.xq'
1519--- test/rbkt/Queries/zorba/reference/reference_4.xq 2013-02-07 17:24:36 +0000
1520+++ test/rbkt/Queries/zorba/reference/reference_4.xq 2013-07-24 23:57:26 +0000
1521@@ -1,3 +1,3 @@
1522-import module namespace id = "http://www.zorba-xquery.com/modules/node-reference";
1523+import module namespace id = "http://zorba.io/modules/reference";
1524
1525-id:node-by-reference(xs:anyURI("this:is-not-a-reference"))
1526\ No newline at end of file
1527+id:dereference(xs:anyURI("this:is-not-a-reference"))
1528\ No newline at end of file
1529
1530=== modified file 'test/rbkt/Queries/zorba/reference/reference_5.xq'
1531--- test/rbkt/Queries/zorba/reference/reference_5.xq 2013-02-07 17:24:36 +0000
1532+++ test/rbkt/Queries/zorba/reference/reference_5.xq 2013-07-24 23:57:26 +0000
1533@@ -1,5 +1,5 @@
1534-import module namespace idd = "http://www.zorba-xquery.com/reference" at "reference.xqlib";
1535-import module namespace id = "http://www.zorba-xquery.com/modules/node-reference";
1536+import module namespace idd = "http://zorba.io/reference" at "reference.xqlib";
1537+import module namespace id = "http://zorba.io/modules/reference";
1538 import module namespace doc = "http://www.zorba-xquery.com/modules/store/dynamic/documents";
1539
1540 variable $node:=<root>global</root>;
1541@@ -11,7 +11,7 @@
1542
1543 <temporary-variable-in-scope>
1544 {
1545- let $temp:=<root>temp</root> return id:node-by-reference(id:node-reference($temp))
1546+ let $temp:=<root>temp</root> return id:dereference(id:reference($temp))
1547 }
1548 </temporary-variable-in-scope>
1549
1550@@ -19,8 +19,8 @@
1551 {
1552 let $temp:=<root>temp</root>
1553 return
1554- let $ref:=id:node-reference($temp)
1555- return id:node-by-reference($ref)
1556+ let $ref:=id:reference($temp)
1557+ return id:dereference($ref)
1558 }
1559 </temporary-variable-in-scope>
1560
1561@@ -28,14 +28,14 @@
1562 {
1563 for $i in (1 to 3)
1564 let $temp := <root>temp</root>
1565- let $ref := id:node-reference($temp)
1566- return id:node-by-reference($ref)
1567+ let $ref := id:reference($temp)
1568+ return id:dereference($ref)
1569 }
1570 </temporary-variable-in-scope>
1571
1572 <temporary-variable-in-scope>
1573 {
1574- let $temp:=<root>temp</root> return id:node-by-reference(id:node-reference($temp))
1575+ let $temp:=<root>temp</root> return id:dereference(id:reference($temp))
1576 }
1577 </temporary-variable-in-scope>
1578
1579
1580=== modified file 'test/rbkt/Queries/zorba/reference/reference_coll_1.xq'
1581--- test/rbkt/Queries/zorba/reference/reference_coll_1.xq 2013-02-07 17:24:36 +0000
1582+++ test/rbkt/Queries/zorba/reference/reference_coll_1.xq 2013-07-24 23:57:26 +0000
1583@@ -2,7 +2,7 @@
1584 import module namespace dml = "http://www.zorba-xquery.com/modules/store/static/collections/dml";
1585 import module namespace ns = "http://example.org/datamodule/" at "collections.xqdata";
1586
1587-import module namespace ref = "http://www.zorba-xquery.com/modules/node-reference";
1588+import module namespace ref = "http://zorba.io/modules/reference";
1589
1590 declare namespace ann = "http://www.zorba-xquery.com/annotations";
1591
1592@@ -10,7 +10,7 @@
1593 {
1594 ddl:create(xs:QName("ns:test"));
1595 dml:insert-nodes-last(xs:QName("ns:test"), (<a/>,<b><z/></b>,<c/>));
1596- exit returning ref:node-by-reference(ref:node-reference(dml:collection(xs:QName("ns:test"))[2]));
1597+ exit returning ref:dereference(ref:reference(dml:collection(xs:QName("ns:test"))[2]));
1598 };
1599
1600 local:test()
1601
1602=== modified file 'test/rbkt/Queries/zorba/reference/reference_coll_2.xq'
1603--- test/rbkt/Queries/zorba/reference/reference_coll_2.xq 2013-02-07 17:24:36 +0000
1604+++ test/rbkt/Queries/zorba/reference/reference_coll_2.xq 2013-07-24 23:57:26 +0000
1605@@ -2,7 +2,7 @@
1606 import module namespace dml = "http://www.zorba-xquery.com/modules/store/static/collections/dml";
1607 import module namespace ns = "http://example.org/datamodule/" at "collections.xqdata";
1608
1609-import module namespace ref = "http://www.zorba-xquery.com/modules/node-reference";
1610+import module namespace ref = "http://zorba.io/modules/reference";
1611
1612 declare namespace ann = "http://www.zorba-xquery.com/annotations";
1613
1614@@ -10,7 +10,7 @@
1615 {
1616 ddl:create(xs:QName("ns:test"));
1617 dml:insert-nodes-last(xs:QName("ns:test"), (<a/>,<b><z/></b>,<c/>));
1618- exit returning ref:node-by-reference(ref:node-reference(dml:collection(xs:QName("ns:test"))[2]/z));
1619+ exit returning ref:dereference(ref:reference(dml:collection(xs:QName("ns:test"))[2]/z));
1620 };
1621
1622 local:test()
1623
1624=== modified file 'test/rbkt/Queries/zorba/reference/reference_coll_3.xq'
1625--- test/rbkt/Queries/zorba/reference/reference_coll_3.xq 2013-02-07 17:24:36 +0000
1626+++ test/rbkt/Queries/zorba/reference/reference_coll_3.xq 2013-07-24 23:57:26 +0000
1627@@ -2,7 +2,7 @@
1628 import module namespace dml = "http://www.zorba-xquery.com/modules/store/static/collections/dml";
1629 import module namespace ns = "http://example.org/datamodule/" at "collections.xqdata";
1630
1631-import module namespace ref = "http://www.zorba-xquery.com/modules/node-reference";
1632+import module namespace ref = "http://zorba.io/modules/reference";
1633
1634 declare namespace ann = "http://www.zorba-xquery.com/annotations";
1635
1636@@ -12,7 +12,7 @@
1637 dml:insert-nodes-last(xs:QName("ns:test"), <a><b><c d="e"></c></b></a>);
1638
1639 exit returning
1640- fn:data(ref:node-by-reference(ref:node-reference(dml:collection(xs:QName("ns:test"))/b/c/@d)));
1641+ fn:data(ref:dereference(ref:reference(dml:collection(xs:QName("ns:test"))/b/c/@d)));
1642 };
1643
1644 local:test()
1645
1646=== modified file 'test/rbkt/Queries/zorba/reference/reference_coll_4.xq'
1647--- test/rbkt/Queries/zorba/reference/reference_coll_4.xq 2012-06-28 21:54:08 +0000
1648+++ test/rbkt/Queries/zorba/reference/reference_coll_4.xq 2013-07-24 23:57:26 +0000
1649@@ -2,7 +2,7 @@
1650 import module namespace dml = "http://www.zorba-xquery.com/modules/store/static/collections/dml";
1651 import module namespace ns = "http://example.org/datamodule/" at "collections.xqdata";
1652
1653-import module namespace ref = "http://www.zorba-xquery.com/modules/node-reference";
1654+import module namespace ref = "http://zorba.io/modules/reference";
1655
1656 declare namespace ann = "http://www.zorba-xquery.com/annotations";
1657
1658@@ -11,9 +11,9 @@
1659 ddl:create(xs:QName("ns:test2"));
1660 dml:insert-nodes(xs:QName("ns:test2"), <a><b><c d="e"></c></b></a>);
1661 variable $node := dml:collection(xs:QName("ns:test2"))/b/c/@d;
1662- variable $has1 := ref:has-node-reference($node);
1663- variable $ref := ref:node-reference($node);
1664- variable $has2 := ref:has-node-reference($node);
1665+ variable $has1 := ref:has-reference($node);
1666+ variable $ref := ref:reference($node);
1667+ variable $has2 := ref:has-reference($node);
1668 ($has1, $has2)
1669 };
1670
1671
1672=== modified file 'test/rbkt/Queries/zorba/reference/reference_coll_5.xq'
1673--- test/rbkt/Queries/zorba/reference/reference_coll_5.xq 2012-06-28 21:54:08 +0000
1674+++ test/rbkt/Queries/zorba/reference/reference_coll_5.xq 2013-07-24 23:57:26 +0000
1675@@ -2,7 +2,7 @@
1676 import module namespace dml = "http://www.zorba-xquery.com/modules/store/static/collections/dml";
1677 import module namespace ns = "http://example.org/datamodule/" at "collections.xqdata";
1678
1679-import module namespace ref = "http://www.zorba-xquery.com/modules/node-reference";
1680+import module namespace ref = "http://zorba.io/modules/reference";
1681
1682 declare namespace ann = "http://www.zorba-xquery.com/annotations";
1683
1684@@ -11,10 +11,10 @@
1685 ddl:create(xs:QName("ns:test2"));
1686 variable $ref := xs:anyURI("urn:uuid:e35e9021-0a1c-48c7-8902-833105a2f013");
1687 variable $node := dml:apply-insert-nodes(xs:QName("ns:test2"), <f><g><h i="j"></h></g></f>);
1688- variable $has1 := ref:has-node-reference($node);
1689- ref:assign-node-reference($node, $ref);
1690- variable $has2 := ref:has-node-reference($node);
1691- variable $find := ref:node-by-reference($ref);
1692+ variable $has1 := ref:has-reference($node);
1693+ ref:assign-reference($node, $ref);
1694+ variable $has2 := ref:has-reference($node);
1695+ variable $find := ref:dereference($ref);
1696 ($has1, $has2, $node is $find)
1697 };
1698
1699
1700=== modified file 'test/rbkt/Queries/zorba/string/AnalyzeString/http-client-doc.htm'
1701--- test/rbkt/Queries/zorba/string/AnalyzeString/http-client-doc.htm 2013-07-17 15:48:38 +0000
1702+++ test/rbkt/Queries/zorba/string/AnalyzeString/http-client-doc.htm 2013-07-24 23:57:26 +0000
1703@@ -181,7 +181,7 @@
1704 </sup>
1705 </li>
1706 <li>
1707- <a href="www.zorba-xquery.com_modules_node-reference.html" title="http://www.zorba-xquery.com/modules/node-reference">node-reference</a>
1708+ <a href="www.zorba-xquery.com_modules_node-reference.html" title="http://zorba.io/modules/reference">node-reference</a>
1709 <sup>
1710 <a href="http://www.w3.org/TR/xquery-30/#dt-external-function" target="_blank" title="There are external functions (either private or public) declared in this module.">(E)</a>
1711 </sup>
1712
1713=== modified file 'test/rbkt/Queries/zorba/xqddf/test-node-reference.xq'
1714--- test/rbkt/Queries/zorba/xqddf/test-node-reference.xq 2013-06-25 03:55:20 +0000
1715+++ test/rbkt/Queries/zorba/xqddf/test-node-reference.xq 2013-07-24 23:57:26 +0000
1716@@ -1,13 +1,9 @@
1717-import module namespace ref = "http://www.zorba-xquery.com/modules/node-reference";
1718+import module namespace ref = "http://zorba.io/modules/reference";
1719
1720 declare namespace zerr = "http://zorba.io/modules/zorba-errors";
1721
1722 declare function local:foo($ref as xs:anyURI) {
1723- ref:node-by-reference($ref)
1724+ ref:dereference($ref)
1725 };
1726
1727-try {
1728- local:foo(xs:anyURI("sausalito://www.google.com"))
1729-} catch zerr:ZAPI0028 {
1730- true()
1731-}
1732+fn:empty(local:foo(xs:anyURI("sausalito://www.google.com")))

Subscribers

People subscribed via source and target branches