Merge lp:~zorba-coders/zorba/fn_envvars into lp:zorba

Proposed by Matthias Brantner
Status: Superseded
Proposed branch: lp:~zorba-coders/zorba/fn_envvars
Merge into: lp:zorba
Diff against target: 4020 lines (+1944/-745)
57 files modified
ChangeLog (+5/-0)
NOTICE.txt (+0/-740)
include/zorba/pregenerated/diagnostic_list.h (+4/-0)
modules/w3c/pregenerated/xqt-errors.xq (+18/-0)
modules/w3c/xpath_functions.xq (+46/-1)
src/context/dynamic_context.cpp (+150/-3)
src/context/dynamic_context.h (+11/-0)
src/diagnostics/diagnostic_en.xml (+16/-0)
src/diagnostics/pregenerated/diagnostic_list.cpp (+6/-0)
src/diagnostics/pregenerated/dict_en.cpp (+2/-0)
src/functions/pregenerated/func_access.cpp (+111/-0)
src/functions/pregenerated/func_access.h (+79/-0)
src/functions/pregenerated/func_collections.cpp (+33/-0)
src/functions/pregenerated/func_collections.h (+15/-0)
src/functions/pregenerated/func_sequences.cpp (+148/-0)
src/functions/pregenerated/func_sequences.h (+75/-0)
src/functions/pregenerated/function_enum.h (+10/-0)
src/runtime/collections/collections_impl.cpp (+122/-0)
src/runtime/collections/pregenerated/collections.cpp (+24/-0)
src/runtime/collections/pregenerated/collections.h (+51/-0)
src/runtime/sequences/pregenerated/sequences.cpp (+116/-0)
src/runtime/sequences/pregenerated/sequences.h (+219/-0)
src/runtime/sequences/sequences_impl.cpp (+272/-0)
src/runtime/spec/collections/collections.xml (+33/-0)
src/runtime/spec/sequences/sequences.xml (+172/-1)
src/runtime/visitors/pregenerated/planiter_visitor.h (+30/-0)
src/runtime/visitors/pregenerated/printer_visitor.cpp (+84/-0)
src/runtime/visitors/pregenerated/printer_visitor.h (+18/-0)
test/rbkt/ExpQueryResults/zorba/collections/uri-collection_1.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/sequences/available-environment-variables.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/sequences/environment-variable_1.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/sequences/environment-variable_2.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/sequences/unparsed-text-available.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/sequences/unparsed-text-lines_1.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/sequences/unparsed-text-lines_2.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/sequences/unparsed-text_1.xml.res (+3/-0)
test/rbkt/ExpQueryResults/zorba/sequences/unparsed-text_2.xml.res (+3/-0)
test/rbkt/Queries/zorba/collections/uri-collection.xml (+6/-0)
test/rbkt/Queries/zorba/collections/uri-collection_1.xq (+16/-0)
test/rbkt/Queries/zorba/collections/uri-collection_2.spec (+1/-0)
test/rbkt/Queries/zorba/collections/uri-collection_2.xq (+16/-0)
test/rbkt/Queries/zorba/sequences/available-environment-variables.xq (+3/-0)
test/rbkt/Queries/zorba/sequences/environment-variable_1.xq (+4/-0)
test/rbkt/Queries/zorba/sequences/environment-variable_2.xq (+2/-0)
test/rbkt/Queries/zorba/sequences/unparsed-text-available.xq (+1/-0)
test/rbkt/Queries/zorba/sequences/unparsed-text-lines_1.xq (+1/-0)
test/rbkt/Queries/zorba/sequences/unparsed-text-lines_2.xq (+1/-0)
test/rbkt/Queries/zorba/sequences/unparsed-text-lines_3.spec (+1/-0)
test/rbkt/Queries/zorba/sequences/unparsed-text-lines_3.xq (+1/-0)
test/rbkt/Queries/zorba/sequences/unparsed-text-lines_4.spec (+1/-0)
test/rbkt/Queries/zorba/sequences/unparsed-text-lines_4.xq (+1/-0)
test/rbkt/Queries/zorba/sequences/unparsed-text_1.xq (+1/-0)
test/rbkt/Queries/zorba/sequences/unparsed-text_2.xq (+1/-0)
test/rbkt/Queries/zorba/sequences/unparsed-text_3.spec (+1/-0)
test/rbkt/Queries/zorba/sequences/unparsed-text_3.xq (+1/-0)
test/rbkt/Queries/zorba/sequences/unparsed-text_4.spec (+1/-0)
test/rbkt/Queries/zorba/sequences/unparsed-text_4.xq (+1/-0)
To merge this branch: bzr merge lp:~zorba-coders/zorba/fn_envvars
Reviewer Review Type Date Requested Status
Sorin Marian Nasoi Pending
Matthias Brantner Pending
Review via email: mp+101880@code.launchpad.net

This proposal supersedes a proposal from 2012-04-13.

This proposal has been superseded by a proposal from 2012-04-13.

Commit message

Bug #930157: fn:available-environment-variables Implementation
Bug #930158: fn:environment-variables Implementation
Bug #930160: fn:uri-collection Implementation
Bug #930161: fn:unparsed-text Implementation
Bug #930162: fn:unparsed-text-available Implementation

Description of the change

Bug #930157: fn:available-environment-variables Implementation
Bug #930158: fn:environment-variables Implementation
Bug #930160: fn:uri-collection Implementation
Bug #930161: fn:unparsed-text Implementation
Bug #930162: fn:unparsed-text-available Implementation

To post a comment you must log in.
Revision history for this message
Chris Hillery (ceejatec) wrote : Posted in a previous version of this proposal

Why did you delete NOTICE.txt?

Revision history for this message
Juan Zacarias (juan457) wrote : Posted in a previous version of this proposal

> Why did you delete NOTICE.txt?
I am not really sure why that happened but it should be there now

Revision history for this message
Matthias Brantner (matthias-brantner) wrote : Posted in a previous version of this proposal

I'm not entirely sure but the diff now only shows whitespace differences in generated files. I didn't find any change which adds one of the new functions.

review: Needs Information
Revision history for this message
Juan Zacarias (juan457) wrote : Posted in a previous version of this proposal

> I'm not entirely sure but the diff now only shows whitespace differences in
> generated files. I didn't find any change which adds one of the new functions.

The diff below just show the diff for the errors in which the error codes FOUT1170 and FOUT1190 where added the diffs for the implementation should be on
sequence_impl.cpp for unparsed-text(), unparsed-text-available(), environment-variable(), available-environments-variables()
and in collections_impl.cpp there is uri-collection()

Revision history for this message
Matthias Brantner (matthias-brantner) wrote : Posted in a previous version of this proposal

- dynamic_context::get_environment_variable(const zstring varname)

should be

dynamic_context::get_environment_variable(const zstring& varname)

- spaces before "(". for example "if (...) instead of if(...)"

- all new functions in sequences_impl.cpp are indented with two spaces. the other functions are not

- if(result)
{
  STACK_PUSH(true, state);
}
STACK_PUSH(false, state);

could be written as STACK_PUSH(result!=NULL, state);

- In FnEnvironmentVariableIterator::nextImpl, the check if(consumeNext(item, theChildren[0].getp(),planState)) is not necessary. consumeNext always returns true because the functions is defined to accept xs:string (not xs:string?)

- item->getString() returns a const zstring&. This should be the type of the variable.

- store::Item_t item2 is not used in the function

- In FnAvailableEnvironmentVariablesIterator::nextImpl, the line a = result->getStringValue().c_str(); and the variable a don't seem to be necessary

- The environment-related functions should be specified using

<zorba:methods>
  <zorba:accessesDynCtx returnValue="true"/>
</zorba:methods>

- All the lines after 14.8.5 fn:unparsed-text have windows line endings

- you can check using transcode::is_necessary if a encoding is supported

- It's unclear when the original stream for unparsed-text is released. This seems to be a memory leak.

- The unparsed-text related functions should be specified as

<zorba:methods>
  <zorba:accessesDynCtx returnValue="true"/>
  <zorba:isSource returnValue="true"/>
</zorba:methods>

- What's the default encoding for unparsed-text?

review: Needs Fixing
Revision history for this message
Juan Zacarias (juan457) wrote : Posted in a previous version of this proposal

I will make all those changes, Thanks.

and answering your questions

> - you can check using transcode::is_necessary if a encoding is supported
If I am not wrong I am using it that way.

> - What's the default encoding for unparsed-text?
UTF-8

The thing with the encoding is that the encoding is defined in the call of the function unparsed-text and unparsed-text-available being initialized with UTF-8 as a default, should I change the default definition to be inside readDocument function so that you don't have to defined in each function?

Revision history for this message
Matthias Brantner (matthias-brantner) wrote : Posted in a previous version of this proposal

> I will make all those changes, Thanks.
>
> and answering your questions
>
> > - you can check using transcode::is_necessary if a encoding is supported
> If I am not wrong I am using it that way.
My bad, I meant transcode::is_supported should be used.

> > > - What's the default encoding for unparsed-text?
> UTF-8
OK, got it. It's fine as it is.

Revision history for this message
Juan Zacarias (juan457) wrote : Posted in a previous version of this proposal

> - It's unclear when the original stream for unparsed-text is released. This
> seems to be a memory leak.
for the original stream of unparsed-text which variable you mean?

Revision history for this message
Matthias Brantner (matthias-brantner) wrote : Posted in a previous version of this proposal

> > - It's unclear when the original stream for unparsed-text is released. This
> > seems to be a memory leak.
> for the original stream of unparsed-text which variable you mean?
Yes, the stream you receive from the StreamResource contains a stream which is wrapped into a streamable string. The stream in the streamable string is released but the original one isn't. I think you need to remember it in a map and release it when the stream you created is released.

Revision history for this message
Juan Zacarias (juan457) wrote : Posted in a previous version of this proposal

> > > - It's unclear when the original stream for unparsed-text is released.
> This
> > > seems to be a memory leak.
> > for the original stream of unparsed-text which variable you mean?
> Yes, the stream you receive from the StreamResource contains a stream which is
> wrapped into a streamable string. The stream in the streamable string is
> released but the original one isn't. I think you need to remember it in a map
> and release it when the stream you created is released.

One more doubt regarding this, I got a little bit confused while trying to fix this, the one you mean is the stream that is inside the StreamResource, is the one that needs to be released right? since I had to set the StreamReleaser of it to a nullptr

Revision history for this message
Sorin Marian Nasoi (sorin.marian.nasoi) wrote : Posted in a previous version of this proposal

I ran
ctest -R xquery_3_0
on this branch, and:

- the following functions from F&O 3.0 spec are still not implemented:
filter#2 fold-left#3 fold-right#3 function-lookup#2 map#2 map-pairs#3 parse-xml-fragment#1 unparsed-text-lines#1 unparsed-text-lines#2 has-children#0 nilled#0 path#0 path#1

- the following functions are in the fn namespace (according to the introspection module) and the F&O 3.0 spec state that they should not be there:
parse-xml#2 partial-apply#2 partial-apply#3

So it seems that all functions linked to this commit are implemented.

Revision history for this message
Juan Zacarias (juan457) wrote : Posted in a previous version of this proposal

the errors mentioned should be solved now.
let me know if there is any other thing to be changed before merging.

Revision history for this message
Matthias Brantner (matthias-brantner) wrote : Posted in a previous version of this proposal

- the unparsed-text-lines function doesn't really stream because it materializes all the lines in a vector before returning them. Instead, the iterator should keep the istream in it's state and return the lines as they are parsed from the stream.
- the two readDocument functions share a lot of code which should be factorized
- please add spaces after keywords like if and while to be consistent with the other conventions in the sequences_impl.cpp file
- Normilize => Normalize
- wrong comment for the FnUnparsedTextLinesIterator::nextImpl function (14.8.6 fn:unparsed-text-lines)
- I think the unparsed-text-lines function returns an eventually empty last line. However, the spec says that it shouldn't return such an empty string.
- unparsed-text-lines should return the empty sequence if there are no lines in the input. However, it seems to raise FOUT1170.

review: Needs Fixing
Revision history for this message
Juan Zacarias (juan457) wrote : Posted in a previous version of this proposal

> - the unparsed-text-lines function doesn't really stream because it
> materializes all the lines in a vector before returning them. Instead, the
> iterator should keep the istream in it's state and return the lines as they
> are parsed from the stream.
Just one question about this, the Item returned by the function for each line should be a Stream then?

Revision history for this message
Matthias Brantner (matthias-brantner) wrote : Posted in a previous version of this proposal

> > - the unparsed-text-lines function doesn't really stream because it
> > materializes all the lines in a vector before returning them. Instead, the
> > iterator should keep the istream in it's state and return the lines as they
> > are parsed from the stream.
> Just one question about this, the Item returned by the function for each line
> should be a Stream then?
No, I don't think that's necessary. A line should be relatively short. It would probably be overhead to stream a single line.

Revision history for this message
Juan Zacarias (juan457) wrote : Posted in a previous version of this proposal

Errors are Fixed

Revision history for this message
Matthias Brantner (matthias-brantner) wrote : Posted in a previous version of this proposal

- There seems to be a merge conflict.
- The stream stored in the state must be deleted using the streamReleaser
- The lErrorMessage stream is passed as parameter but the errors only take one parameter.
- The LoadProperties are not used anywhere
- The following can be simplified
  if(getline(*state->theStream, streamLine))
  {
    do
    {
      STACK_PUSH(GENV_ITEMFACTORY->createString(result, streamLine), state);
    }
    while (getline(*state->theStream, streamLine));
  }
  else
    STACK_PUSH(false, state);

=>
    while (getline(*state->theStream, streamLine))
    {
      STACK_PUSH(GENV_ITEMFACTORY->createString(result, streamLine), state);
    }

review: Needs Fixing
Revision history for this message
Chris Hillery (ceejatec) wrote : Posted in a previous version of this proposal

Regarding point 2: Remember that the StreamReleaser and the istream must always be kept together as a pair, and the StreamReleaser must be the only way that you clean up the istream. Here, you are deleting the istream directly (bad), and by setting the StreamReleaser on theStreamResource to nullptr, you're breaking up the pair (also bad).

In this case, the StreamResource is already maintaining the pair, and so you can actually make your life easier by just maintaining ownership of the StreamResource and making sure that IT is deleted when you're done. In that case you never have to look at StreamReleaser at all. To do this:

 - In FnUnparsedTextLinesIterator::nextImpl(), change lResource.get() to lResource.release(). By doing this, you take ownership of the StreamResource (so that the auto_ptr<> won't delete it).

 - Later in the same function, don't call state->theStreamResource->setStreamReleaser(nullptr);.

 - In FnUnparsedTextLinesIteratorState::reset(), just delete theStreamResource, and then set theStream and theStreamResource to 0. Deleting the StreamResource will correctly clean up the stream by calling the StreamReleaser.

If I understand Matthias, you will also need to delete theStreamResource in the state's destructor, in case of exceptions. (That's why you set theStreamResource to 0 in reset(), so you can't accidentally delete it twice.)

Revision history for this message
Juan Zacarias (juan457) wrote : Posted in a previous version of this proposal

all changes done

lp:~zorba-coders/zorba/fn_envvars updated
10635. By Matthias Brantner

regenerated files to reduce size of diff

10636. By Juan Zacarias

Fixed tests: introsp-fn-7 and xquery_1_0

Unmerged revisions

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'ChangeLog'
2--- ChangeLog 2012-04-12 09:32:55 +0000
3+++ ChangeLog 2012-04-13 09:46:19 +0000
4@@ -3,6 +3,11 @@
5 version 2.5
6
7 New Features:
8+ * fn:available-environment-variables
9+ * fn:environment-variables
10+ * fn:uri-collection
11+ * fn:unparsed-text
12+ * fn:unparsed-text-available
13 * Extended API for Python, Java, PHP and Ruby.
14
15 Optimization:
16
17=== added file 'NOTICE.txt'
18--- NOTICE.txt 1970-01-01 00:00:00 +0000
19+++ NOTICE.txt 2012-04-13 09:46:19 +0000
20@@ -0,0 +1,740 @@
21+-----------
22+Zorba 2.2.0
23+-----------
24+
25+(Note: This file is generated automatically from NOTICE.xml.
26+Please do not modify this file directly.)
27+
28+
29+
30+
31+Apache 2
32+
33+ Copyright 2006-2011 The FLWOR Foundation
34+
35+ See LICENSE.txt for license information.
36+
37+ ------------------------
38+ This product includes software developed at
39+ The FLWOR Foundation (http://www.flworfound.org/).
40+
41+ ------------------------
42+ Portions of this software were developed at the Systems
43+ Group of the ETH Zurich, Switzerland.
44+
45+
46+Other files used by this project:
47+----------------------------------------------------
48+
49+src/zorbatypes/m_apm.h
50+src/zorbatypes/mapm/
51+
52+Copyright: 1999-2007 Michael C. Ring
53+Website: http://www.tc.umn.edu/~ringx004/mapm-main.html
54+
55+ This software is Freeware.
56+
57+ Permission to use, copy, and distribute this software and its
58+ documentation for any purpose with or without fee is hereby granted,
59+ provided that the above copyright notice appear in all copies and
60+ that both that copyright notice and this permission notice appear
61+ in supporting documentation.
62+
63+ Permission to modify the software is granted. Permission to distribute
64+ the modified code is granted. Modifications are to be distributed by
65+ using the file 'license.txt' as a template to modify the file header.
66+ 'license.txt' is available in the official MAPM distribution.
67+
68+ To distribute modified source code, insert the file 'license.txt'
69+ at the top of all modified source code files and edit accordingly.
70+
71+ This software is provided "as is" without express or implied warranty.
72+
73+----------------------------------------------------
74+
75+src/zorbamisc/config/stdint.h
76+
77+Copyright: 2006 Alexander Chemeris
78+
79+
80+ Redistribution and use in source and binary forms, with or without
81+ modification, are permitted provided that the following conditions are met:
82+
83+ 1. Redistributions of source code must retain the above copyright notice,
84+ this list of conditions and the following disclaimer.
85+
86+ 2. Redistributions in binary form must reproduce the above copyright
87+ notice, this list of conditions and the following disclaimer in the
88+ documentation and/or other materials provided with the distribution.
89+
90+ 3. The name of the author may be used to endorse or promote products
91+ derived from this software without specific prior written permission.
92+
93+ THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
94+ WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
95+ MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
96+ EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
97+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
98+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
99+ OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
100+ WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
101+ OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
102+ ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
103+
104+----------------------------------------------------
105+
106+src/zorbautils/stemmer/
107+
108+Copyright: 2001 Dr. Martin Porter
109+
110+
111+ All the software given out on this Snowball site is covered by the BSD
112+ License (see http://www.opensource.org/licenses/bsd-license.html), with
113+ Copyright (c) 2001, Dr Martin Porter, and (for the Java developments)
114+ Copyright (c) 2002, Richard Boulton.
115+
116+ Essentially, all this means is that you can do what you like with the code,
117+ except claim another Copyright for it, or claim that it is issued under a
118+ different license. The software is also issued without warranties, which
119+ means that if anyone suffers through its use, they cannot come back and sue
120+ you. You also have to alert anyone to whom you give the Snowball software to
121+ the fact that it is covered by the BSD license.
122+
123+ We have not bothered to insert the licensing arrangement into the text of
124+ the Snowball software.
125+
126+----------------------------------------------------
127+
128+src/util/less.h
129+
130+Copyright: 1998 Paul J. Lucas
131+
132+
133+ Redistribution and use in source and binary forms, with or without
134+ modification, are permitted provided that the following conditions are met:
135+
136+ o Redistributions of source code must retain the above copyright notice,
137+ this list of conditions and the following disclaimer.
138+
139+ o Redistributions in binary form must reproduce the above copyright
140+ notice, this list of conditions and the following disclaimer in the
141+ documentation and/or other materials provided with the distribution.
142+
143+ o The name of the author may not be used to endorse or promote products
144+ derived from this software without specific prior written permission.
145+
146+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
147+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
148+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
149+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
150+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
151+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
152+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
153+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
154+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
155+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
156+ POSSIBILITY OF SUCH DAMAGE.
157+
158+----------------------------------------------------
159+
160+src/util/auto_vector.h (has been modified)
161+
162+Copyright: 2003 Reliable Software
163+
164+
165+ Redistribution and use in source and binary forms, with or without
166+ modification, are permitted provided that the following conditions are met:
167+
168+ o Redistributions of source code must retain the above copyright notice,
169+ this list of conditions and the following disclaimer.
170+
171+ o Redistributions in binary form must reproduce the above copyright
172+ notice, this list of conditions and the following disclaimer in the
173+ documentation and/or other materials provided with the distribution.
174+
175+ o The name of the author may not be used to endorse or promote products
176+ derived from this software without specific prior written permission.
177+
178+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
179+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
180+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
181+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
182+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
183+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
184+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
185+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
186+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
187+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
188+ POSSIBILITY OF SUCH DAMAGE.
189+
190+----------------------------------------------------
191+
192+cmake_modules/FindBoost.cmake
193+
194+Copyright:
195+ 2006-2008 Andreas Schneider <mail@cynapses.org>
196+ 2007 Wengo
197+ 2007 Mike Jackson
198+ 2008 Andreas Pakulat <apaku@gmx.de>
199+
200+
201+
202+ Redistribution AND use is allowed according to the terms of the New BSD license.
203+ For details see the accompanying COPYING-CMAKE-SCRIPTS file.
204+
205+----------------------------------------------------
206+
207+cmake_modules/FindJNI.cmake
208+cmake_modules/FindPythonLibs.cmake
209+cmake_modules/FindSWIG.cmake
210+
211+Copyright: 2001-2009 Kitware, Inc.
212+
213+
214+ Distributed under the OSI-approved BSD License (the "License");
215+ see accompanying file Copyright.txt for details.
216+
217+ This software is distributed WITHOUT ANY WARRANTY; without even the
218+ implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
219+ See the License for more information.
220+
221+ CMake - Cross Platform Makefile Generator
222+ Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
223+ All rights reserved.
224+
225+ Redistribution and use in source and binary forms, with or without
226+ modification, are permitted provided that the following conditions
227+ are met:
228+
229+ * Redistributions of source code must retain the above copyright
230+ notice, this list of conditions and the following disclaimer.
231+
232+ * Redistributions in binary form must reproduce the above copyright
233+ notice, this list of conditions and the following disclaimer in the
234+ documentation and/or other materials provided with the distribution.
235+
236+ * Neither the names of Kitware, Inc., the Insight Software Consortium,
237+ nor the names of their contributors may be used to endorse or promote
238+ products derived from this software without specific prior written
239+ permission.
240+
241+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
242+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
243+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
244+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
245+ HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
246+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
247+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
248+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
249+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
250+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
251+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
252+
253+ ------------------------------------------------------------------------------
254+
255+ The above copyright and license notice applies to distributions of
256+ CMake in source and binary form. Some source files contain additional
257+ notices of original copyright by their contributors; see each source
258+ for details. Third-party software packages supplied with CMake under
259+ compatible licenses provide their own copyright notices documented in
260+ corresponding subdirectories.
261+
262+ ------------------------------------------------------------------------------
263+
264+ CMake was initially developed by Kitware with the following sponsorship:
265+
266+ * National Library of Medicine at the National Institutes of Health
267+ as part of the Insight Segmentation and Registration Toolkit (ITK).
268+
269+ * US National Labs (Los Alamos, Livermore, Sandia) ASC Parallel
270+ Visualization Initiative.
271+
272+ * National Alliance for Medical Image Computing (NAMIC) is funded by the
273+ National Institutes of Health through the NIH Roadmap for Medical Research,
274+ Grant U54 EB005149.
275+
276+ * Kitware, Inc.
277+
278+----------------------------------------------------
279+
280+/xml.xsd
281+
282+Copyright: 2001 World Wide Web Consortium, (Massachusetts Institute of Technology, European Research Consortium for Informatics and Mathematics, Keio University)
283+
284+
285+ All Rights Reserved. This work is distributed under the W3C Software License [1] in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
286+
287+ W3C Software Notice and License
288+
289+ This work (and included software, documentation such as READMEs, or other related items) is being provided by the copyright holders under the following license.
290+
291+ License
292+
293+ By obtaining, using and/or copying this work, you (the licensee) agree that you have read, understood, and will comply with the following terms and conditions.
294+
295+ Permission to copy, modify, and distribute this software and its documentation, with or without modification, for any purpose and without fee or royalty is hereby granted, provided that you include the following on ALL copies of the software and documentation or portions thereof, including modifications:
296+ •The full text of this NOTICE in a location viewable to users of the redistributed or derivative work.
297+ •Any pre-existing intellectual property disclaimers, notices, or terms and conditions. If none exist, the W3C Software Short Notice should be included (hypertext is preferred, text is permitted) within the body of any redistributed or derivative code.
298+ •Notice of any changes or modifications to the files, including the date changes were made. (We recommend you provide URIs to the location from which the code is derived.)
299+
300+ Disclaimers
301+
302+ THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE OR DOCUMENTATION WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.
303+
304+ COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR DOCUMENTATION.
305+
306+ The name and trademarks of copyright holders may NOT be used in advertising or publicity pertaining to the software without specific, written prior permission. Title to copyright in this software and any associated documentation will at all times remain with copyright holders.
307+
308+----------------------------------------------------
309+
310+schemas/xslt-xquery-serialization.xsd
311+
312+Copyright: 2010 World Wide Web Consortium, (Massachusetts Institute of Technology, European Research Consortium for Informatics and Mathematics, Keio University)
313+
314+
315+ All Rights Reserved. This work is distributed under the W3C Software License [1] in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
316+
317+ W3C Software Notice and License
318+
319+ This work (and included software, documentation such as READMEs, or other related items) is being provided by the copyright holders under the following license.
320+
321+ License
322+
323+ By obtaining, using and/or copying this work, you (the licensee) agree that you have read, understood, and will comply with the following terms and conditions.
324+
325+ Permission to copy, modify, and distribute this software and its documentation, with or without modification, for any purpose and without fee or royalty is hereby granted, provided that you include the following on ALL copies of the software and documentation or portions thereof, including modifications:
326+ •The full text of this NOTICE in a location viewable to users of the redistributed or derivative work.
327+ •Any pre-existing intellectual property disclaimers, notices, or terms and conditions. If none exist, the W3C Software Short Notice should be included (hypertext is preferred, text is permitted) within the body of any redistributed or derivative code.
328+ •Notice of any changes or modifications to the files, including the date changes were made. (We recommend you provide URIs to the location from which the code is derived.)
329+
330+ Disclaimers
331+
332+ THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE OR DOCUMENTATION WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.
333+
334+ COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR DOCUMENTATION.
335+
336+ The name and trademarks of copyright holders may NOT be used in advertising or publicity pertaining to the software without specific, written prior permission. Title to copyright in this software and any associated documentation will at all times remain with copyright holders.
337+
338+----------------------------------------------------
339+
340+modules/w3c/xpath-functions.xsd
341+
342+Copyright: 2005 World Wide Web Consortium, (Massachusetts Institute of Technology, European Research Consortium for Informatics and Mathematics, Keio University)
343+
344+
345+ All Rights Reserved. This work is distributed under the W3C Software License [1] in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
346+
347+ W3C Software Notice and License
348+
349+ This work (and included software, documentation such as READMEs, or other related items) is being provided by the copyright holders under the following license.
350+
351+ License
352+
353+ By obtaining, using and/or copying this work, you (the licensee) agree that you have read, understood, and will comply with the following terms and conditions.
354+
355+ Permission to copy, modify, and distribute this software and its documentation, with or without modification, for any purpose and without fee or royalty is hereby granted, provided that you include the following on ALL copies of the software and documentation or portions thereof, including modifications:
356+ •The full text of this NOTICE in a location viewable to users of the redistributed or derivative work.
357+ •Any pre-existing intellectual property disclaimers, notices, or terms and conditions. If none exist, the W3C Software Short Notice should be included (hypertext is preferred, text is permitted) within the body of any redistributed or derivative code.
358+ •Notice of any changes or modifications to the files, including the date changes were made. (We recommend you provide URIs to the location from which the code is derived.)
359+
360+ Disclaimers
361+
362+ THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE OR DOCUMENTATION WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.
363+
364+ COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR DOCUMENTATION.
365+
366+ The name and trademarks of copyright holders may NOT be used in advertising or publicity pertaining to the software without specific, written prior permission. Title to copyright in this software and any associated documentation will at all times remain with copyright holders.
367+
368+----------------------------------------------------
369+
370+include/xqc.h
371+
372+Copyright: 2008, Matthias Brantner, John Snelson
373+
374+
375+ * All rights reserved.
376+ *
377+ * Redistribution and use in source and binary forms, with or without
378+ * modification, are permitted provided that the following conditions are met:
379+ *
380+ * * Redistributions of source code must retain the above copyright notice,
381+ * this list of conditions and the following disclaimer.
382+ * * Redistributions in binary form must reproduce the above copyright
383+ * notice, this list of conditions and the following disclaimer in the
384+ * documentation and/or other materials provided with the distribution.
385+ * * Neither the name of the developers nor the names of contributors may be
386+ * used to endorse or promote products derived from this software without
387+ * specific prior written permission.
388+ *
389+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
390+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
391+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
392+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
393+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
394+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
395+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
396+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
397+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
398+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
399+ * POSSIBILITY OF SUCH DAMAGE.
400+
401+----------------------------------------------------
402+
403+modules/functx/functx.xq
404+
405+Copyright: 2007 Datypic
406+
407+
408+ : This library is free software; you can redistribute it and/or
409+ : modify it under the terms of the GNU Lesser General Public
410+ : License as published by the Free Software Foundation; either
411+ : version 2.1 of the License.
412+
413+ : This library is distributed in the hope that it will be useful,
414+ : but WITHOUT ANY WARRANTY; without even the implied warranty of
415+ : MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
416+ : Lesser General Public License for more details.
417+
418+ : You should have received a copy of the GNU Lesser General Public
419+ : License along with this library; if not, write to the Free Software
420+ : Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
421+
422+----------------------------------------------------
423+
424+src/compiler/parser/FlexLexer.h
425+
426+Copyright: 1993 The Regents of the University of California
427+
428+
429+ // All rights reserved.
430+ //
431+ // This code is derived from software contributed to Berkeley by
432+ // Kent Williams and Tom Epperly.
433+ //
434+ // Redistribution and use in source and binary forms, with or without
435+ // modification, are permitted provided that the following conditions
436+ // are met:
437+
438+ // 1. Redistributions of source code must retain the above copyright
439+ // notice, this list of conditions and the following disclaimer.
440+ // 2. Redistributions in binary form must reproduce the above copyright
441+ // notice, this list of conditions and the following disclaimer in the
442+ // documentation and/or other materials provided with the distribution.
443+
444+ // Neither the name of the University nor the names of its contributors
445+ // may be used to endorse or promote products derived from this software
446+ // without specific prior written permission.
447+
448+ // THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
449+ // IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
450+ // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
451+ // PURPOSE.
452+
453+----------------------------------------------------
454+
455+src/diagnostics/StackWalker.cpp
456+src/diagnostics/StackWalker.h
457+
458+Copyright: 2005 Jochen Kalmbach
459+
460+
461+ Under BSD License: http://www.opensource.org/licenses/bsd-license.php
462+
463+----------------------------------------------------
464+
465+src/util/singleton.h
466+src/util/threads.h
467+
468+Copyright: 2001 Andrei Alexandrescu
469+
470+
471+ This code accompanies the book:
472+ Alexandrescu, Andrei. "Modern C++ Design: Generic Programming and Design
473+ Patterns Applied". Copyright (c) 2001. Addison-Wesley.
474+ Permission to use, copy, modify, distribute and sell this software for any
475+ purpose is hereby granted without fee, provided that the above copyright
476+ notice appear in all copies and that both that copyright notice and this
477+ permission notice appear in supporting documentation.
478+ The author or Addison-Wesley Longman make no representations about the
479+ suitability of this software for any purpose. It is provided "as is"
480+ without express or implied warranty.
481+
482+
483+External libraries used by this project:
484+----------------------------------------------------
485+
486+Name: LIBXML2
487+Preferred version: 2.2.16 or higher
488+Is mandatory: true
489+Website: http://xmlsoft.org/
490+License: MIT
491+Copyright: 1998-2002 Daniel Veillard. All Rights Reserved.
492+External notice:
493+
494+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
495+
496+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
497+
498+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
499+
500+ Except as contained in this notice, the name of Daniel Veillard shall not
501+ be used in advertising or otherwise to promote the sale, use or other deal-
502+ ings in this Software without prior written authorization from him.
503+
504+----------------------------------------------------
505+
506+Name: LIBXSLT
507+Preferred version: 1.1.26
508+Is mandatory: false
509+Website: http://xmlsoft.org/XSLT/
510+License: MIT
511+Copyright: 2001-2002 Daniel Veillard. All Rights Reserved.
512+External notice:
513+
514+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
515+
516+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
517+
518+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL DANIEL VEILLARD BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
519+
520+
521+ Except as contained in this notice, the name of Daniel Veillard shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from him.
522+
523+
524+----------------------------------------------------
525+
526+Name: ICU4C
527+Preferred version: 3.6 or higher
528+Is mandatory: true
529+Website: http://www.icu-project.org/
530+License: ICU License
531+Copyright: 1995-2011 International Business Machines Corporation and others
532+External notice:
533+
534+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, provided that the above copyright notice(s) and this permission notice appear in all copies of the Software and that both the above copyright notice(s) and this permission notice appear in supporting documentation.
535+
536+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
537+
538+ Except as contained in this notice, the name of a copyright holder shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization of the copyright holder.
539+
540+----------------------------------------------------
541+
542+Name: CURL
543+Preferred version: above 7.12
544+Is mandatory: false
545+Website: http://curl.haxx.se/
546+License: MIT/X derivate license
547+Copyright: 1996 - 2011, Daniel Stenberg, <daniel@haxx.se>.
548+External notice:
549+
550+ All rights reserved.
551+
552+ Permission to use, copy, modify, and distribute this software for any purpose
553+ with or without fee is hereby granted, provided that the above copyright
554+ notice and this permission notice appear in all copies.
555+
556+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
557+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
558+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN
559+ NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
560+ DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
561+ OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
562+ OR OTHER DEALINGS IN THE SOFTWARE.
563+
564+ Except as contained in this notice, the name of a copyright holder shall not
565+ be used in advertising or otherwise to promote the sale, use or other dealings
566+ in this Software without prior written authorization of the copyright holder.
567+
568+----------------------------------------------------
569+
570+Name: ICONV
571+Preferred version: above 1.12
572+Is mandatory: true
573+Website: http://www.gnu.org/software/libiconv/
574+License: LGPL
575+Copyright: 1998, 2010 Free Software Foundation, Inc.
576+External notice:
577+
578+----------------------------------------------------
579+
580+Name: ZLIB
581+Preferred version: 1.2.5
582+Is mandatory: true
583+Website: http://www.zlib.net/
584+Copyright: 1995-2004 Jean-loup Gailly and Mark Adler
585+External notice:
586+
587+ This software is provided 'as-is', without any express or implied
588+ warranty. In no event will the authors be held liable for any damages
589+ arising from the use of this software.
590+
591+ Permission is granted to anyone to use this software for any purpose,
592+ including commercial applications, and to alter it and redistribute it
593+ freely, subject to the following restrictions:
594+
595+ 1. The origin of this software must not be misrepresented; you must not
596+ claim that you wrote the original software. If you use this software
597+ in a product, an acknowledgment in the product documentation would be
598+ appreciated but is not required.
599+ 2. Altered source versions must be plainly marked as such, and must not be
600+ misrepresented as being the original software.
601+ 3. This notice may not be removed or altered from any source distribution.
602+
603+ Jean-loup Gailly jloup@gzip.org
604+ Mark Adler madler@alumni.caltech.edu
605+
606+----------------------------------------------------
607+
608+Name: XERCES
609+Preferred version: 2.8.0 or higher
610+Is mandatory: true
611+Website: http://xerces.apache.org/xerces-c/
612+License: Apache 2
613+Copyright: Copyright © 1999-2010 The Apache Software Foundation. All Rights Reserved.
614+External notice:
615+
616+ http://www.apache.org/licenses/LICENSE-2.0
617+
618+----------------------------------------------------
619+
620+Name: BOOST (boost_filesystem)
621+Preferred version: 1.32 or higher
622+Is mandatory: false
623+Website: http://www.boost.org/
624+License: Boost Software License v1.0
625+Copyright:
626+ Beman Dawes, David Abrahams, 1998-2005.
627+ Rene Rivera 2004-2007
628+
629+External notice:
630+
631+ Permission is hereby granted, free of charge, to any person or organization
632+ obtaining a copy of the software and accompanying documentation covered by
633+ this license (the "Software") to use, reproduce, display, distribute,
634+ execute, and transmit the Software, and to prepare derivative works of the
635+ Software, and to permit third-parties to whom the Software is furnished to
636+ do so, all subject to the following:
637+
638+ The copyright notices in the Software and this entire statement, including
639+ the above license grant, this restriction and the following disclaimer,
640+ must be included in all copies of the Software, in whole or in part, and
641+ all derivative works of the Software, unless such copies or derivative
642+ works are solely in the form of machine-executable object code generated by
643+ a source language processor.
644+
645+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
646+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
647+ FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
648+ SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
649+ FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
650+ ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
651+ DEALINGS IN THE SOFTWARE.
652+
653+
654+External applications used by this project:
655+----------------------------------------------------
656+
657+Name: FLEX
658+Preferred version: 2.5.33
659+Is mandatory: false
660+Website: http://flex.sourceforge.net/
661+Copyright:
662+ 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The Flex Project.
663+ 1990, 1997 The Regents of the University of California. All rights reserved.
664+
665+External notice:
666+
667+ Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
668+
669+ 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
670+ 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
671+
672+ Neither the name of the University nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
673+
674+ THIS SOFTWARE IS PROVIDED “AS IS” AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
675+
676+----------------------------------------------------
677+
678+Name: BISON
679+Preferred version: 2.4 or higher
680+Is mandatory: false
681+Website: http://www.gnu.org/software/bison/
682+License: GPL
683+Copyright: 1998, 2001, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
684+External notice:
685+
686+----------------------------------------------------
687+
688+Name: DOXYGEN
689+Preferred version: v1.7.4
690+Is mandatory: false
691+Website: www.doxygen.org
692+License: GPL
693+Copyright: 1997-2011 by Dimitri van Heesch
694+External notice:
695+
696+ Permission to use, copy, modify, and distribute this software and its documentation under the terms of the GNU General Public License is hereby granted.
697+ No representations are made about the suitability of this software for any purpose.
698+ It is provided "as is" without express or implied warranty.
699+ See the GNU General Public License for more details.
700+
701+ Documents produced by doxygen are derivative works derived from the input used in their production; they are not affected by this license.
702+
703+----------------------------------------------------
704+
705+Name: CMAKE
706+Preferred version: 2.8.4
707+Is mandatory: true
708+Website: http://www.cmake.org/
709+License: Creative Commons Attribution-NoDerivs 3.0 Unported License
710+Copyright: 2000-2009 Kitware, Inc., Insight Software Consortium. All rights reserved.
711+External notice:
712+
713+ Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
714+
715+ Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
716+
717+ Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
718+
719+ Neither the names of Kitware, Inc., the Insight Software Consortium, nor the names of their contributors may be used to endorse or promote products derived from this software without specific prior written permission.
720+
721+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
722+
723+----------------------------------------------------
724+
725+Name: SWIG
726+Preferred version: 2.0.4 or above
727+Is mandatory: false
728+Website: http://www.swig.org/
729+License: GPL
730+Copyright:
731+ 1995-2011 The SWIG Developers
732+ 2005-2006 Arizona Board of Regents (University of Arizona).
733+ 1998-2005 University of Chicago.
734+ 1995-1998 The University of Utah and the Regents of the University of California
735+
736+External notice:
737+
738+ SWIG is free software: you can redistribute it and/or modify it
739+ under the terms of the GNU General Public License as published by
740+ the Free Software Foundation, either version 3 of the License, or
741+ (at your option) any later version. See the LICENSE-GPL file for
742+ the full terms of the GNU General Public license version 3.
743+
744+ Portions of SWIG are also licensed under the terms of the licenses
745+ in the file LICENSE-UNIVERSITIES. You must observe the terms of
746+ these licenses, as well as the terms of the GNU General Public License,
747+ when you distribute SWIG.
748+
749+ The SWIG library and examples, under the Lib and Examples top level
750+ directories, are distributed under the following terms:
751+
752+ You may copy, modify, distribute, and make derivative works based on
753+ this software, in source code or object code form, without
754+ restriction. If you distribute the software to others, you may do
755+ so according to the terms of your choice. This software is offered as
756+ is, without warranty of any kind.
757+
758+ See the COPYRIGHT file for a list of contributors to SWIG and their
759+ copyright notices.
760+
761\ No newline at end of file
762
763=== removed file 'NOTICE.txt'
764--- NOTICE.txt 2012-03-28 05:19:57 +0000
765+++ NOTICE.txt 1970-01-01 00:00:00 +0000
766@@ -1,740 +0,0 @@
767------------
768-Zorba 2.2.0
769------------
770-
771-(Note: This file is generated automatically from NOTICE.xml.
772-Please do not modify this file directly.)
773-
774-
775-
776-
777-Apache 2
778-
779- Copyright 2006-2011 The FLWOR Foundation
780-
781- See LICENSE.txt for license information.
782-
783- ------------------------
784- This product includes software developed at
785- The FLWOR Foundation (http://www.flworfound.org/).
786-
787- ------------------------
788- Portions of this software were developed at the Systems
789- Group of the ETH Zurich, Switzerland.
790-
791-
792-Other files used by this project:
793-----------------------------------------------------
794-
795-src/zorbatypes/m_apm.h
796-src/zorbatypes/mapm/
797-
798-Copyright: 1999-2007 Michael C. Ring
799-Website: http://www.tc.umn.edu/~ringx004/mapm-main.html
800-
801- This software is Freeware.
802-
803- Permission to use, copy, and distribute this software and its
804- documentation for any purpose with or without fee is hereby granted,
805- provided that the above copyright notice appear in all copies and
806- that both that copyright notice and this permission notice appear
807- in supporting documentation.
808-
809- Permission to modify the software is granted. Permission to distribute
810- the modified code is granted. Modifications are to be distributed by
811- using the file 'license.txt' as a template to modify the file header.
812- 'license.txt' is available in the official MAPM distribution.
813-
814- To distribute modified source code, insert the file 'license.txt'
815- at the top of all modified source code files and edit accordingly.
816-
817- This software is provided "as is" without express or implied warranty.
818-
819-----------------------------------------------------
820-
821-src/zorbamisc/config/stdint.h
822-
823-Copyright: 2006 Alexander Chemeris
824-
825-
826- Redistribution and use in source and binary forms, with or without
827- modification, are permitted provided that the following conditions are met:
828-
829- 1. Redistributions of source code must retain the above copyright notice,
830- this list of conditions and the following disclaimer.
831-
832- 2. Redistributions in binary form must reproduce the above copyright
833- notice, this list of conditions and the following disclaimer in the
834- documentation and/or other materials provided with the distribution.
835-
836- 3. The name of the author may be used to endorse or promote products
837- derived from this software without specific prior written permission.
838-
839- THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
840- WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
841- MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
842- EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
843- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
844- PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
845- OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
846- WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
847- OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
848- ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
849-
850-----------------------------------------------------
851-
852-src/zorbautils/stemmer/
853-
854-Copyright: 2001 Dr. Martin Porter
855-
856-
857- All the software given out on this Snowball site is covered by the BSD
858- License (see http://www.opensource.org/licenses/bsd-license.html), with
859- Copyright (c) 2001, Dr Martin Porter, and (for the Java developments)
860- Copyright (c) 2002, Richard Boulton.
861-
862- Essentially, all this means is that you can do what you like with the code,
863- except claim another Copyright for it, or claim that it is issued under a
864- different license. The software is also issued without warranties, which
865- means that if anyone suffers through its use, they cannot come back and sue
866- you. You also have to alert anyone to whom you give the Snowball software to
867- the fact that it is covered by the BSD license.
868-
869- We have not bothered to insert the licensing arrangement into the text of
870- the Snowball software.
871-
872-----------------------------------------------------
873-
874-src/util/less.h
875-
876-Copyright: 1998 Paul J. Lucas
877-
878-
879- Redistribution and use in source and binary forms, with or without
880- modification, are permitted provided that the following conditions are met:
881-
882- o Redistributions of source code must retain the above copyright notice,
883- this list of conditions and the following disclaimer.
884-
885- o Redistributions in binary form must reproduce the above copyright
886- notice, this list of conditions and the following disclaimer in the
887- documentation and/or other materials provided with the distribution.
888-
889- o The name of the author may not be used to endorse or promote products
890- derived from this software without specific prior written permission.
891-
892- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
893- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
894- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
895- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
896- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
897- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
898- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
899- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
900- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
901- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
902- POSSIBILITY OF SUCH DAMAGE.
903-
904-----------------------------------------------------
905-
906-src/util/auto_vector.h (has been modified)
907-
908-Copyright: 2003 Reliable Software
909-
910-
911- Redistribution and use in source and binary forms, with or without
912- modification, are permitted provided that the following conditions are met:
913-
914- o Redistributions of source code must retain the above copyright notice,
915- this list of conditions and the following disclaimer.
916-
917- o Redistributions in binary form must reproduce the above copyright
918- notice, this list of conditions and the following disclaimer in the
919- documentation and/or other materials provided with the distribution.
920-
921- o The name of the author may not be used to endorse or promote products
922- derived from this software without specific prior written permission.
923-
924- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
925- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
926- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
927- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
928- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
929- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
930- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
931- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
932- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
933- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
934- POSSIBILITY OF SUCH DAMAGE.
935-
936-----------------------------------------------------
937-
938-cmake_modules/FindBoost.cmake
939-
940-Copyright:
941- 2006-2008 Andreas Schneider <mail@cynapses.org>
942- 2007 Wengo
943- 2007 Mike Jackson
944- 2008 Andreas Pakulat <apaku@gmx.de>
945-
946-
947-
948- Redistribution AND use is allowed according to the terms of the New BSD license.
949- For details see the accompanying COPYING-CMAKE-SCRIPTS file.
950-
951-----------------------------------------------------
952-
953-cmake_modules/FindJNI.cmake
954-cmake_modules/FindPythonLibs.cmake
955-cmake_modules/FindSWIG.cmake
956-
957-Copyright: 2001-2009 Kitware, Inc.
958-
959-
960- Distributed under the OSI-approved BSD License (the "License");
961- see accompanying file Copyright.txt for details.
962-
963- This software is distributed WITHOUT ANY WARRANTY; without even the
964- implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
965- See the License for more information.
966-
967- CMake - Cross Platform Makefile Generator
968- Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
969- All rights reserved.
970-
971- Redistribution and use in source and binary forms, with or without
972- modification, are permitted provided that the following conditions
973- are met:
974-
975- * Redistributions of source code must retain the above copyright
976- notice, this list of conditions and the following disclaimer.
977-
978- * Redistributions in binary form must reproduce the above copyright
979- notice, this list of conditions and the following disclaimer in the
980- documentation and/or other materials provided with the distribution.
981-
982- * Neither the names of Kitware, Inc., the Insight Software Consortium,
983- nor the names of their contributors may be used to endorse or promote
984- products derived from this software without specific prior written
985- permission.
986-
987- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
988- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
989- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
990- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
991- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
992- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
993- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
994- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
995- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
996- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
997- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
998-
999- ------------------------------------------------------------------------------
1000-
1001- The above copyright and license notice applies to distributions of
1002- CMake in source and binary form. Some source files contain additional
1003- notices of original copyright by their contributors; see each source
1004- for details. Third-party software packages supplied with CMake under
1005- compatible licenses provide their own copyright notices documented in
1006- corresponding subdirectories.
1007-
1008- ------------------------------------------------------------------------------
1009-
1010- CMake was initially developed by Kitware with the following sponsorship:
1011-
1012- * National Library of Medicine at the National Institutes of Health
1013- as part of the Insight Segmentation and Registration Toolkit (ITK).
1014-
1015- * US National Labs (Los Alamos, Livermore, Sandia) ASC Parallel
1016- Visualization Initiative.
1017-
1018- * National Alliance for Medical Image Computing (NAMIC) is funded by the
1019- National Institutes of Health through the NIH Roadmap for Medical Research,
1020- Grant U54 EB005149.
1021-
1022- * Kitware, Inc.
1023-
1024-----------------------------------------------------
1025-
1026-/xml.xsd
1027-
1028-Copyright: 2001 World Wide Web Consortium, (Massachusetts Institute of Technology, European Research Consortium for Informatics and Mathematics, Keio University)
1029-
1030-
1031- All Rights Reserved. This work is distributed under the W3C Software License [1] in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
1032-
1033- W3C Software Notice and License
1034-
1035- This work (and included software, documentation such as READMEs, or other related items) is being provided by the copyright holders under the following license.
1036-
1037- License
1038-
1039- By obtaining, using and/or copying this work, you (the licensee) agree that you have read, understood, and will comply with the following terms and conditions.
1040-
1041- Permission to copy, modify, and distribute this software and its documentation, with or without modification, for any purpose and without fee or royalty is hereby granted, provided that you include the following on ALL copies of the software and documentation or portions thereof, including modifications:
1042- •The full text of this NOTICE in a location viewable to users of the redistributed or derivative work.
1043- •Any pre-existing intellectual property disclaimers, notices, or terms and conditions. If none exist, the W3C Software Short Notice should be included (hypertext is preferred, text is permitted) within the body of any redistributed or derivative code.
1044- •Notice of any changes or modifications to the files, including the date changes were made. (We recommend you provide URIs to the location from which the code is derived.)
1045-
1046- Disclaimers
1047-
1048- THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE OR DOCUMENTATION WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.
1049-
1050- COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR DOCUMENTATION.
1051-
1052- The name and trademarks of copyright holders may NOT be used in advertising or publicity pertaining to the software without specific, written prior permission. Title to copyright in this software and any associated documentation will at all times remain with copyright holders.
1053-
1054-----------------------------------------------------
1055-
1056-schemas/xslt-xquery-serialization.xsd
1057-
1058-Copyright: 2010 World Wide Web Consortium, (Massachusetts Institute of Technology, European Research Consortium for Informatics and Mathematics, Keio University)
1059-
1060-
1061- All Rights Reserved. This work is distributed under the W3C Software License [1] in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
1062-
1063- W3C Software Notice and License
1064-
1065- This work (and included software, documentation such as READMEs, or other related items) is being provided by the copyright holders under the following license.
1066-
1067- License
1068-
1069- By obtaining, using and/or copying this work, you (the licensee) agree that you have read, understood, and will comply with the following terms and conditions.
1070-
1071- Permission to copy, modify, and distribute this software and its documentation, with or without modification, for any purpose and without fee or royalty is hereby granted, provided that you include the following on ALL copies of the software and documentation or portions thereof, including modifications:
1072- •The full text of this NOTICE in a location viewable to users of the redistributed or derivative work.
1073- •Any pre-existing intellectual property disclaimers, notices, or terms and conditions. If none exist, the W3C Software Short Notice should be included (hypertext is preferred, text is permitted) within the body of any redistributed or derivative code.
1074- •Notice of any changes or modifications to the files, including the date changes were made. (We recommend you provide URIs to the location from which the code is derived.)
1075-
1076- Disclaimers
1077-
1078- THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE OR DOCUMENTATION WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.
1079-
1080- COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR DOCUMENTATION.
1081-
1082- The name and trademarks of copyright holders may NOT be used in advertising or publicity pertaining to the software without specific, written prior permission. Title to copyright in this software and any associated documentation will at all times remain with copyright holders.
1083-
1084-----------------------------------------------------
1085-
1086-modules/w3c/xpath-functions.xsd
1087-
1088-Copyright: 2005 World Wide Web Consortium, (Massachusetts Institute of Technology, European Research Consortium for Informatics and Mathematics, Keio University)
1089-
1090-
1091- All Rights Reserved. This work is distributed under the W3C Software License [1] in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
1092-
1093- W3C Software Notice and License
1094-
1095- This work (and included software, documentation such as READMEs, or other related items) is being provided by the copyright holders under the following license.
1096-
1097- License
1098-
1099- By obtaining, using and/or copying this work, you (the licensee) agree that you have read, understood, and will comply with the following terms and conditions.
1100-
1101- Permission to copy, modify, and distribute this software and its documentation, with or without modification, for any purpose and without fee or royalty is hereby granted, provided that you include the following on ALL copies of the software and documentation or portions thereof, including modifications:
1102- •The full text of this NOTICE in a location viewable to users of the redistributed or derivative work.
1103- •Any pre-existing intellectual property disclaimers, notices, or terms and conditions. If none exist, the W3C Software Short Notice should be included (hypertext is preferred, text is permitted) within the body of any redistributed or derivative code.
1104- •Notice of any changes or modifications to the files, including the date changes were made. (We recommend you provide URIs to the location from which the code is derived.)
1105-
1106- Disclaimers
1107-
1108- THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE OR DOCUMENTATION WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.
1109-
1110- COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR DOCUMENTATION.
1111-
1112- The name and trademarks of copyright holders may NOT be used in advertising or publicity pertaining to the software without specific, written prior permission. Title to copyright in this software and any associated documentation will at all times remain with copyright holders.
1113-
1114-----------------------------------------------------
1115-
1116-include/xqc.h
1117-
1118-Copyright: 2008, Matthias Brantner, John Snelson
1119-
1120-
1121- * All rights reserved.
1122- *
1123- * Redistribution and use in source and binary forms, with or without
1124- * modification, are permitted provided that the following conditions are met:
1125- *
1126- * * Redistributions of source code must retain the above copyright notice,
1127- * this list of conditions and the following disclaimer.
1128- * * Redistributions in binary form must reproduce the above copyright
1129- * notice, this list of conditions and the following disclaimer in the
1130- * documentation and/or other materials provided with the distribution.
1131- * * Neither the name of the developers nor the names of contributors may be
1132- * used to endorse or promote products derived from this software without
1133- * specific prior written permission.
1134- *
1135- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
1136- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1137- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
1138- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
1139- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
1140- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
1141- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
1142- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
1143- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
1144- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
1145- * POSSIBILITY OF SUCH DAMAGE.
1146-
1147-----------------------------------------------------
1148-
1149-modules/functx/functx.xq
1150-
1151-Copyright: 2007 Datypic
1152-
1153-
1154- : This library is free software; you can redistribute it and/or
1155- : modify it under the terms of the GNU Lesser General Public
1156- : License as published by the Free Software Foundation; either
1157- : version 2.1 of the License.
1158-
1159- : This library is distributed in the hope that it will be useful,
1160- : but WITHOUT ANY WARRANTY; without even the implied warranty of
1161- : MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1162- : Lesser General Public License for more details.
1163-
1164- : You should have received a copy of the GNU Lesser General Public
1165- : License along with this library; if not, write to the Free Software
1166- : Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
1167-
1168-----------------------------------------------------
1169-
1170-src/compiler/parser/FlexLexer.h
1171-
1172-Copyright: 1993 The Regents of the University of California
1173-
1174-
1175- // All rights reserved.
1176- //
1177- // This code is derived from software contributed to Berkeley by
1178- // Kent Williams and Tom Epperly.
1179- //
1180- // Redistribution and use in source and binary forms, with or without
1181- // modification, are permitted provided that the following conditions
1182- // are met:
1183-
1184- // 1. Redistributions of source code must retain the above copyright
1185- // notice, this list of conditions and the following disclaimer.
1186- // 2. Redistributions in binary form must reproduce the above copyright
1187- // notice, this list of conditions and the following disclaimer in the
1188- // documentation and/or other materials provided with the distribution.
1189-
1190- // Neither the name of the University nor the names of its contributors
1191- // may be used to endorse or promote products derived from this software
1192- // without specific prior written permission.
1193-
1194- // THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
1195- // IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
1196- // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
1197- // PURPOSE.
1198-
1199-----------------------------------------------------
1200-
1201-src/diagnostics/StackWalker.cpp
1202-src/diagnostics/StackWalker.h
1203-
1204-Copyright: 2005 Jochen Kalmbach
1205-
1206-
1207- Under BSD License: http://www.opensource.org/licenses/bsd-license.php
1208-
1209-----------------------------------------------------
1210-
1211-src/util/singleton.h
1212-src/util/threads.h
1213-
1214-Copyright: 2001 Andrei Alexandrescu
1215-
1216-
1217- This code accompanies the book:
1218- Alexandrescu, Andrei. "Modern C++ Design: Generic Programming and Design
1219- Patterns Applied". Copyright (c) 2001. Addison-Wesley.
1220- Permission to use, copy, modify, distribute and sell this software for any
1221- purpose is hereby granted without fee, provided that the above copyright
1222- notice appear in all copies and that both that copyright notice and this
1223- permission notice appear in supporting documentation.
1224- The author or Addison-Wesley Longman make no representations about the
1225- suitability of this software for any purpose. It is provided "as is"
1226- without express or implied warranty.
1227-
1228-
1229-External libraries used by this project:
1230-----------------------------------------------------
1231-
1232-Name: LIBXML2
1233-Preferred version: 2.2.16 or higher
1234-Is mandatory: true
1235-Website: http://xmlsoft.org/
1236-License: MIT
1237-Copyright: 1998-2002 Daniel Veillard. All Rights Reserved.
1238-External notice:
1239-
1240- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
1241-
1242- The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
1243-
1244- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
1245-
1246- Except as contained in this notice, the name of Daniel Veillard shall not
1247- be used in advertising or otherwise to promote the sale, use or other deal-
1248- ings in this Software without prior written authorization from him.
1249-
1250-----------------------------------------------------
1251-
1252-Name: LIBXSLT
1253-Preferred version: 1.1.26
1254-Is mandatory: false
1255-Website: http://xmlsoft.org/XSLT/
1256-License: MIT
1257-Copyright: 2001-2002 Daniel Veillard. All Rights Reserved.
1258-External notice:
1259-
1260- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
1261-
1262- The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
1263-
1264- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL DANIEL VEILLARD BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
1265-
1266-
1267- Except as contained in this notice, the name of Daniel Veillard shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from him.
1268-
1269-
1270-----------------------------------------------------
1271-
1272-Name: ICU4C
1273-Preferred version: 3.6 or higher
1274-Is mandatory: true
1275-Website: http://www.icu-project.org/
1276-License: ICU License
1277-Copyright: 1995-2011 International Business Machines Corporation and others
1278-External notice:
1279-
1280- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, provided that the above copyright notice(s) and this permission notice appear in all copies of the Software and that both the above copyright notice(s) and this permission notice appear in supporting documentation.
1281-
1282- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
1283-
1284- Except as contained in this notice, the name of a copyright holder shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization of the copyright holder.
1285-
1286-----------------------------------------------------
1287-
1288-Name: CURL
1289-Preferred version: above 7.12
1290-Is mandatory: false
1291-Website: http://curl.haxx.se/
1292-License: MIT/X derivate license
1293-Copyright: 1996 - 2011, Daniel Stenberg, <daniel@haxx.se>.
1294-External notice:
1295-
1296- All rights reserved.
1297-
1298- Permission to use, copy, modify, and distribute this software for any purpose
1299- with or without fee is hereby granted, provided that the above copyright
1300- notice and this permission notice appear in all copies.
1301-
1302- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1303- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1304- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN
1305- NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
1306- DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
1307- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
1308- OR OTHER DEALINGS IN THE SOFTWARE.
1309-
1310- Except as contained in this notice, the name of a copyright holder shall not
1311- be used in advertising or otherwise to promote the sale, use or other dealings
1312- in this Software without prior written authorization of the copyright holder.
1313-
1314-----------------------------------------------------
1315-
1316-Name: ICONV
1317-Preferred version: above 1.12
1318-Is mandatory: true
1319-Website: http://www.gnu.org/software/libiconv/
1320-License: LGPL
1321-Copyright: 1998, 2010 Free Software Foundation, Inc.
1322-External notice:
1323-
1324-----------------------------------------------------
1325-
1326-Name: ZLIB
1327-Preferred version: 1.2.5
1328-Is mandatory: true
1329-Website: http://www.zlib.net/
1330-Copyright: 1995-2004 Jean-loup Gailly and Mark Adler
1331-External notice:
1332-
1333- This software is provided 'as-is', without any express or implied
1334- warranty. In no event will the authors be held liable for any damages
1335- arising from the use of this software.
1336-
1337- Permission is granted to anyone to use this software for any purpose,
1338- including commercial applications, and to alter it and redistribute it
1339- freely, subject to the following restrictions:
1340-
1341- 1. The origin of this software must not be misrepresented; you must not
1342- claim that you wrote the original software. If you use this software
1343- in a product, an acknowledgment in the product documentation would be
1344- appreciated but is not required.
1345- 2. Altered source versions must be plainly marked as such, and must not be
1346- misrepresented as being the original software.
1347- 3. This notice may not be removed or altered from any source distribution.
1348-
1349- Jean-loup Gailly jloup@gzip.org
1350- Mark Adler madler@alumni.caltech.edu
1351-
1352-----------------------------------------------------
1353-
1354-Name: XERCES
1355-Preferred version: 2.8.0 or higher
1356-Is mandatory: true
1357-Website: http://xerces.apache.org/xerces-c/
1358-License: Apache 2
1359-Copyright: Copyright © 1999-2010 The Apache Software Foundation. All Rights Reserved.
1360-External notice:
1361-
1362- http://www.apache.org/licenses/LICENSE-2.0
1363-
1364-----------------------------------------------------
1365-
1366-Name: BOOST (boost_filesystem)
1367-Preferred version: 1.32 or higher
1368-Is mandatory: false
1369-Website: http://www.boost.org/
1370-License: Boost Software License v1.0
1371-Copyright:
1372- Beman Dawes, David Abrahams, 1998-2005.
1373- Rene Rivera 2004-2007
1374-
1375-External notice:
1376-
1377- Permission is hereby granted, free of charge, to any person or organization
1378- obtaining a copy of the software and accompanying documentation covered by
1379- this license (the "Software") to use, reproduce, display, distribute,
1380- execute, and transmit the Software, and to prepare derivative works of the
1381- Software, and to permit third-parties to whom the Software is furnished to
1382- do so, all subject to the following:
1383-
1384- The copyright notices in the Software and this entire statement, including
1385- the above license grant, this restriction and the following disclaimer,
1386- must be included in all copies of the Software, in whole or in part, and
1387- all derivative works of the Software, unless such copies or derivative
1388- works are solely in the form of machine-executable object code generated by
1389- a source language processor.
1390-
1391- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1392- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1393- FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
1394- SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
1395- FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
1396- ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
1397- DEALINGS IN THE SOFTWARE.
1398-
1399-
1400-External applications used by this project:
1401-----------------------------------------------------
1402-
1403-Name: FLEX
1404-Preferred version: 2.5.33
1405-Is mandatory: false
1406-Website: http://flex.sourceforge.net/
1407-Copyright:
1408- 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The Flex Project.
1409- 1990, 1997 The Regents of the University of California. All rights reserved.
1410-
1411-External notice:
1412-
1413- Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1414-
1415- 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
1416- 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
1417-
1418- Neither the name of the University nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
1419-
1420- THIS SOFTWARE IS PROVIDED “AS IS” AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
1421-
1422-----------------------------------------------------
1423-
1424-Name: BISON
1425-Preferred version: 2.4 or higher
1426-Is mandatory: false
1427-Website: http://www.gnu.org/software/bison/
1428-License: GPL
1429-Copyright: 1998, 2001, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
1430-External notice:
1431-
1432-----------------------------------------------------
1433-
1434-Name: DOXYGEN
1435-Preferred version: v1.7.4
1436-Is mandatory: false
1437-Website: www.doxygen.org
1438-License: GPL
1439-Copyright: 1997-2011 by Dimitri van Heesch
1440-External notice:
1441-
1442- Permission to use, copy, modify, and distribute this software and its documentation under the terms of the GNU General Public License is hereby granted.
1443- No representations are made about the suitability of this software for any purpose.
1444- It is provided "as is" without express or implied warranty.
1445- See the GNU General Public License for more details.
1446-
1447- Documents produced by doxygen are derivative works derived from the input used in their production; they are not affected by this license.
1448-
1449-----------------------------------------------------
1450-
1451-Name: CMAKE
1452-Preferred version: 2.8.4
1453-Is mandatory: true
1454-Website: http://www.cmake.org/
1455-License: Creative Commons Attribution-NoDerivs 3.0 Unported License
1456-Copyright: 2000-2009 Kitware, Inc., Insight Software Consortium. All rights reserved.
1457-External notice:
1458-
1459- Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1460-
1461- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
1462-
1463- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
1464-
1465- Neither the names of Kitware, Inc., the Insight Software Consortium, nor the names of their contributors may be used to endorse or promote products derived from this software without specific prior written permission.
1466-
1467- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1468-
1469-----------------------------------------------------
1470-
1471-Name: SWIG
1472-Preferred version: 2.0.4 or above
1473-Is mandatory: false
1474-Website: http://www.swig.org/
1475-License: GPL
1476-Copyright:
1477- 1995-2011 The SWIG Developers
1478- 2005-2006 Arizona Board of Regents (University of Arizona).
1479- 1998-2005 University of Chicago.
1480- 1995-1998 The University of Utah and the Regents of the University of California
1481-
1482-External notice:
1483-
1484- SWIG is free software: you can redistribute it and/or modify it
1485- under the terms of the GNU General Public License as published by
1486- the Free Software Foundation, either version 3 of the License, or
1487- (at your option) any later version. See the LICENSE-GPL file for
1488- the full terms of the GNU General Public license version 3.
1489-
1490- Portions of SWIG are also licensed under the terms of the licenses
1491- in the file LICENSE-UNIVERSITIES. You must observe the terms of
1492- these licenses, as well as the terms of the GNU General Public License,
1493- when you distribute SWIG.
1494-
1495- The SWIG library and examples, under the Lib and Examples top level
1496- directories, are distributed under the following terms:
1497-
1498- You may copy, modify, distribute, and make derivative works based on
1499- this software, in source code or object code form, without
1500- restriction. If you distribute the software to others, you may do
1501- so according to the terms of your choice. This software is offered as
1502- is, without warranty of any kind.
1503-
1504- See the COPYRIGHT file for a list of contributors to SWIG and their
1505- copyright notices.
1506-
1507\ No newline at end of file
1508
1509=== modified file 'include/zorba/pregenerated/diagnostic_list.h'
1510--- include/zorba/pregenerated/diagnostic_list.h 2012-03-28 05:19:57 +0000
1511+++ include/zorba/pregenerated/diagnostic_list.h 2012-04-13 09:46:19 +0000
1512@@ -286,6 +286,10 @@
1513
1514 extern ZORBA_DLL_PUBLIC XQueryErrorCode FOTY0015;
1515
1516+extern ZORBA_DLL_PUBLIC XQueryErrorCode FOUT1170;
1517+
1518+extern ZORBA_DLL_PUBLIC XQueryErrorCode FOUT1190;
1519+
1520 extern ZORBA_DLL_PUBLIC XQueryErrorCode XUST0001;
1521
1522 extern ZORBA_DLL_PUBLIC XQueryErrorCode XUST0002;
1523
1524=== modified file 'modules/w3c/pregenerated/xqt-errors.xq'
1525--- modules/w3c/pregenerated/xqt-errors.xq 2012-03-28 05:19:57 +0000
1526+++ modules/w3c/pregenerated/xqt-errors.xq 2012-04-13 09:46:19 +0000
1527@@ -1240,6 +1240,24 @@
1528
1529 (:~
1530 :
1531+ : Identifier cannot be used to retrive a resource containing text
1532+ :
1533+ : @see http://www.w3.org/2005/xqt-errors
1534+:)
1535+declare variable $err:FOUT1170 as xs:QName := fn:QName($err:NS, "err:FOUT1170");
1536+
1537+(:~
1538+ :
1539+ : Retrieved resource contains octets that cannot be decoded into Unicode
1540+ : using the specified encoding, the resulting characters are not
1541+ : permitted XML characters or requested encoding not supported
1542+ :
1543+ : @see http://www.w3.org/2005/xqt-errors
1544+:)
1545+declare variable $err:FOUT1190 as xs:QName := fn:QName($err:NS, "err:FOUT1190");
1546+
1547+(:~
1548+ :
1549 : It is a static error if an updating expression is used in any position
1550 : other than one of the following:
1551 : - The topmost expression in the body of a query.
1552
1553=== modified file 'modules/w3c/xpath_functions.xq'
1554--- modules/w3c/xpath_functions.xq 2012-03-28 05:19:57 +0000
1555+++ modules/w3c/xpath_functions.xq 2012-04-13 09:46:19 +0000
1556@@ -994,4 +994,49 @@
1557 (:~
1558 : @see for semantics please check <a href="http://www.w3.org/TR/xpath-functions-30/#func-string">fn:string</a>
1559 :)
1560-declare function fn:string($arg as item()?) as xs:string external;
1561\ No newline at end of file
1562+declare function fn:string($arg as item()?) as xs:string external;
1563+
1564+(:~
1565+ : @see for semantics please check <a href="http://www.w3.org/TR/xpath-functions-30/#func-available-environment-variables">fn:available-environment-variables</a>
1566+ :)
1567+declare function fn:available-environment-variables() as xs:string* external;
1568+
1569+(:~
1570+ : @see for semantics please check <a href="http://www.w3.org/TR/xpath-functions-30/#func-environment-variable">fn:environment-variable</a>
1571+ :)
1572+declare function fn:environment-variable($arg as xs:string) as xs:string? external;
1573+
1574+(:~
1575+ : @see for semantics please check <a href="http://www.w3.org/TR/xpath-functions-30/#func-unparsed-text">fn:unparsed-text</a>
1576+ :)
1577+declare function fn:unparsed-text($href as xs:string?) as xs:string? external;
1578+
1579+(:~
1580+ : @see for semantics please check <a href="http://www.w3.org/TR/xpath-functions-30/#func-unparsed-text">fn:unparsed-text</a>
1581+ :)
1582+declare function fn:unparsed-text($href as xs:string?, $encoding as xs:string) as xs:string? external;
1583+
1584+(:~
1585+ : @see for semantics please check <a href="http://www.w3.org/TR/xpath-functions-30/#func-unparsed-text-available">fn:unparsed-text-available</a>
1586+ :)
1587+declare function fn:unparsed-text-available($href as xs:string?) as xs:boolean external;
1588+
1589+(:~
1590+ : @see for semantics please check <a href="http://www.w3.org/TR/xpath-functions-30/#func-unparsed-text-lines">fn:unparsed-text-lines</a>
1591+ :)
1592+declare function fn:unparsed-text-lines( $href as xs:string?, $encoding as xs:string) as xs:string* external;
1593+
1594+(:~
1595+ : @see for semantics please check <a href="http://www.w3.org/TR/xpath-functions-30/#func-unparsed-text-available">fn:unparsed-text-available</a>
1596+ :)
1597+declare function fn:unparsed-text-available( $href as xs:string?, $encoding as xs:string) as xs:boolean external;
1598+
1599+(:~
1600+ : @see for semantics please check <a href="http://www.w3.org/TR/xpath-functions-30/#func-uri-collection">fn:uri-collection</a>
1601+ :)
1602+declare function fn:uri-collection() as xs:anyURI* external;
1603+
1604+(:~
1605+ : @see for semantics please check <a href="http://www.w3.org/TR/xpath-functions-30/#func-uri-collection">fn:uri-collection</a>
1606+ :)
1607+declare function fn:uri-collection($arg as xs:string?) as xs:anyURI* external;
1608
1609=== modified file 'src/context/dynamic_context.cpp'
1610--- src/context/dynamic_context.cpp 2012-03-28 05:19:57 +0000
1611+++ src/context/dynamic_context.cpp 2012-04-13 09:46:19 +0000
1612@@ -21,6 +21,7 @@
1613 #include <sys/timeb.h>
1614 #ifdef UNIX
1615 #include <sys/time.h>
1616+#include <unistd.h>
1617 #endif
1618
1619 #include "store/api/iterator.h"
1620@@ -29,6 +30,7 @@
1621 #include "store/api/store.h"
1622 #include "store/api/index.h"
1623 #include "store/api/ic.h"
1624+#include "store/api/iterator_factory.h"
1625
1626 #include "system/globalenv.h"
1627
1628@@ -54,10 +56,13 @@
1629
1630 using namespace std;
1631
1632+#ifdef UNIX
1633+//external variables
1634+extern char **environ;
1635+#endif
1636+
1637 namespace zorba
1638 {
1639-
1640-
1641 /*******************************************************************************
1642
1643 ********************************************************************************/
1644@@ -122,6 +127,7 @@
1645 theParent(NULL),
1646 keymap(NULL),
1647 theAvailableIndices(NULL),
1648+ theEnvironmentVariables(NULL),
1649 theDocLoadingUserTime(0.0),
1650 theDocLoadingTime(0)
1651 {
1652@@ -161,6 +167,9 @@
1653 delete keymap;
1654 }
1655
1656+ if(theEnvironmentVariables)
1657+ delete theEnvironmentVariables;
1658+
1659 if (theAvailableIndices)
1660 delete theAvailableIndices;
1661 }
1662@@ -259,6 +268,145 @@
1663 /*******************************************************************************
1664
1665 ********************************************************************************/
1666+void dynamic_context::set_environment_variables()
1667+{
1668+ if (!theEnvironmentVariables)
1669+ theEnvironmentVariables = new EnvVarMap();
1670+
1671+#if defined (WIN32)
1672+ LPTCH envVarsCH = GetEnvironmentStrings();
1673+ LPTSTR envVarsSTR = (LPTSTR) envVarsCH;
1674+
1675+ while (*envVarsSTR)
1676+ {
1677+ int size = lstrlen(envVarsSTR);
1678+
1679+ char * envVar = new char[size+1];
1680+
1681+
1682+ WideCharToMultiByte( CP_ACP,
1683+ WC_NO_BEST_FIT_CHARS|WC_COMPOSITECHECK|WC_DEFAULTCHAR,
1684+ envVarsSTR,
1685+ size+1,
1686+ envVar,
1687+ size+1,
1688+ NULL,
1689+ NULL);
1690+
1691+
1692+ zstring envVarZS(envVar);
1693+
1694+ int eqPos = envVarZS.find_first_of("=");
1695+
1696+ if (eqPos > 0)
1697+ {
1698+ zstring varname(envVarZS.substr(0, eqPos));
1699+ zstring varvalue(envVarZS.substr(eqPos+1, size));
1700+
1701+ if (!varname.empty() || !varvalue.empty())
1702+ theEnvironmentVariables->insert(std::pair<zstring, zstring>(varname,varvalue));
1703+ }
1704+
1705+ delete envVar;
1706+ envVarsSTR += lstrlen(envVarsSTR) + 1;
1707+ }
1708+
1709+ FreeEnvironmentStrings(envVarsCH);
1710+#else
1711+ const char* invalid_char;
1712+ for (char **env = environ; *env; ++env)
1713+ {
1714+ zstring envVarZS(*env);
1715+
1716+ if ((invalid_char = utf8::validate(envVarZS.c_str())) != NULL)
1717+ throw XQUERY_EXCEPTION(err::FOCH0001,
1718+ ERROR_PARAMS(zstring("#x") +
1719+ BUILD_STRING(std::uppercase << std::hex
1720+ << (static_cast<unsigned int>(*invalid_char)&0xFF))));
1721+
1722+ if ((invalid_char = utf8::validate(envVarZS.c_str())) != NULL)
1723+ {
1724+ throw XQUERY_EXCEPTION(err::FOCH0001,
1725+ ERROR_PARAMS(zstring("#x") +
1726+ BUILD_STRING(std::uppercase << std::hex
1727+ << (static_cast<unsigned int>(*invalid_char) & 0xFF)) ));
1728+ }
1729+
1730+ int size = envVarZS.size();
1731+
1732+ int eqPos = envVarZS.find_first_of("=");
1733+
1734+ if (eqPos > 0)
1735+ {
1736+ zstring varname(envVarZS.substr(0, eqPos));
1737+ zstring varvalue(envVarZS.substr(eqPos+1, size));
1738+
1739+ if (!varname.empty() || !varvalue.empty())
1740+ theEnvironmentVariables->insert(std::pair<zstring, zstring>(varname,varvalue));
1741+ }
1742+ }
1743+
1744+#endif
1745+
1746+}
1747+/*******************************************************************************
1748+
1749+********************************************************************************/
1750+store::Iterator_t dynamic_context::available_environment_variables()
1751+{
1752+ if (!theEnvironmentVariables)
1753+ {
1754+ set_environment_variables();
1755+ }
1756+
1757+ EnvVarMap::iterator lIte = theEnvironmentVariables->begin();
1758+ EnvVarMap::iterator lEnd = theEnvironmentVariables->end();
1759+
1760+ std::vector<store::Item_t> lVarNames;
1761+
1762+ for (;lIte != lEnd; ++lIte)
1763+ {
1764+ store::Item_t varname;
1765+ zstring zsvarname = lIte->first;
1766+ GENV_ITEMFACTORY->createString(varname, zsvarname);
1767+ lVarNames.push_back(varname);
1768+ }
1769+
1770+ if (lVarNames.empty())
1771+ {
1772+ return NULL;
1773+ }
1774+
1775+ return GENV_STORE.createTempSeq(lVarNames)->getIterator();
1776+}
1777+
1778+/*******************************************************************************
1779+
1780+********************************************************************************/
1781+store::Item_t dynamic_context::get_environment_variable(const zstring& varname)
1782+{
1783+
1784+ if (!theEnvironmentVariables)
1785+ {
1786+ set_environment_variables();
1787+ }
1788+
1789+ EnvVarMap::iterator lIter = theEnvironmentVariables->find(varname);
1790+
1791+ if (lIter == theEnvironmentVariables->end())
1792+ {
1793+ return NULL;
1794+ }
1795+
1796+ store::Item_t value;
1797+ zstring varvalue = lIter->second;
1798+ GENV_ITEMFACTORY->createString(value, varvalue);
1799+ return value;
1800+}
1801+
1802+/*******************************************************************************
1803+
1804+********************************************************************************/
1805 void dynamic_context::add_variable(ulong varid, store::Iterator_t& value)
1806 {
1807 declare_variable(varid);
1808@@ -607,7 +755,6 @@
1809 {
1810 keymap = new ValueMap(8, false);
1811 }
1812-
1813 if (!keymap->insert(aName, val))
1814 {
1815 keymap->update(aName, val);
1816
1817=== modified file 'src/context/dynamic_context.h'
1818--- src/context/dynamic_context.h 2012-03-28 05:19:57 +0000
1819+++ src/context/dynamic_context.h 2012-04-13 09:46:19 +0000
1820@@ -105,6 +105,8 @@
1821
1822 typedef ItemPointerHashMap<store::Index_t> IndexMap;
1823
1824+ typedef std::map<const zstring,const zstring> EnvVarMap;
1825+
1826 protected:
1827 dynamic_context * theParent;
1828
1829@@ -119,6 +121,9 @@
1830
1831 IndexMap * theAvailableIndices;
1832
1833+ //MODIFY
1834+ EnvVarMap * theEnvironmentVariables;
1835+
1836 public:
1837 double theDocLoadingUserTime;
1838 double theDocLoadingTime;
1839@@ -142,6 +147,12 @@
1840
1841 store::Item_t get_current_time_millis() const;
1842
1843+ void set_environment_variables();
1844+
1845+ store::Item_t get_environment_variable(const zstring& varname);
1846+
1847+ store::Iterator_t available_environment_variables();
1848+
1849 void set_implicit_timezone(long tzone_seconds);
1850
1851 long get_implicit_timezone() const;
1852
1853=== modified file 'src/diagnostics/diagnostic_en.xml'
1854--- src/diagnostics/diagnostic_en.xml 2012-04-10 13:10:22 +0000
1855+++ src/diagnostics/diagnostic_en.xml 2012-04-13 09:46:19 +0000
1856@@ -1142,7 +1142,23 @@
1857 An argument to \c fn:deep-equal() contains a function item.
1858 </comment>
1859 <value>"$1": argument to fn:deep-equal() contains a function item</value>
1860+ </diagnostic>
1861+
1862+ <diagnostic code="FOUT1170">
1863+ <comment>
1864+ Identifier cannot be used to retrive a resource containing text
1865+ </comment>
1866+ <value>"$1": error retrieving resource containing text</value>
1867 </diagnostic>
1868+
1869+ <diagnostic code="FOUT1190">
1870+ <comment>
1871+ Retrieved resource contains octets that cannot be decoded into Unicode
1872+ using the specified encoding, the resulting characters are not
1873+ permitted XML characters or requested encoding not supported
1874+ </comment>
1875+ <value>"$1": Cannot decode resource retrieved</value>
1876+ </diagnostic>
1877
1878 <!--////////// XQuery Update Facility //////////////////////////////////-->
1879
1880
1881=== modified file 'src/diagnostics/pregenerated/diagnostic_list.cpp'
1882--- src/diagnostics/pregenerated/diagnostic_list.cpp 2012-03-28 05:19:57 +0000
1883+++ src/diagnostics/pregenerated/diagnostic_list.cpp 2012-04-13 09:46:19 +0000
1884@@ -411,6 +411,12 @@
1885 XQueryErrorCode FOTY0015( "FOTY0015" );
1886
1887
1888+XQueryErrorCode FOUT1170( "FOUT1170" );
1889+
1890+
1891+XQueryErrorCode FOUT1190( "FOUT1190" );
1892+
1893+
1894 XQueryErrorCode XUST0001( "XUST0001" );
1895
1896
1897
1898=== modified file 'src/diagnostics/pregenerated/dict_en.cpp'
1899--- src/diagnostics/pregenerated/dict_en.cpp 2012-04-10 13:10:22 +0000
1900+++ src/diagnostics/pregenerated/dict_en.cpp 2012-04-13 09:46:19 +0000
1901@@ -74,6 +74,8 @@
1902 { "FOTY0015", "\"$1\": argument to fn:deep-equal() contains a function item" },
1903 { "FOUP0001", "first operand of fn:put() is not a node of a supported kind" },
1904 { "FOUP0002", "second operand of fn:put() is not a valid lexical representation of the xs:anyURI type" },
1905+ { "FOUT1170", "\"$1\": error retrieving resource containing text" },
1906+ { "FOUT1190", "\"$1\": Cannot decode resource retrieved" },
1907 #if !defined(ZORBA_NO_FULL_TEXT)
1908 { "FTDY0016", "\"$1\": invalid weight: absolute value must be in [0,1000]" },
1909 #endif
1910
1911=== added file 'src/functions/pregenerated/func_access.cpp'
1912--- src/functions/pregenerated/func_access.cpp 1970-01-01 00:00:00 +0000
1913+++ src/functions/pregenerated/func_access.cpp 2012-04-13 09:46:19 +0000
1914@@ -0,0 +1,111 @@
1915+/*
1916+ * Copyright 2006-2008 The FLWOR Foundation.
1917+ *
1918+ * Licensed under the Apache License, Version 2.0 (the "License");
1919+ * you may not use this file except in compliance with the License.
1920+ * You may obtain a copy of the License at
1921+ *
1922+ * http://www.apache.org/licenses/LICENSE-2.0
1923+ *
1924+ * Unless required by applicable law or agreed to in writing, software
1925+ * distributed under the License is distributed on an "AS IS" BASIS,
1926+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1927+ * See the License for the specific language governing permissions and
1928+ * limitations under the License.
1929+ */
1930+
1931+// ******************************************
1932+// * *
1933+// * THIS IS A GENERATED FILE. DO NOT EDIT! *
1934+// * SEE .xml FILE WITH SAME NAME *
1935+// * *
1936+// ******************************************
1937+
1938+
1939+#include "stdafx.h"
1940+#include "runtime/access/access.h"
1941+#include "functions/func_access.h"
1942+
1943+
1944+namespace zorba{
1945+
1946+
1947+
1948+PlanIter_t fn_unparsed_text::codegen(
1949+ CompilerCB*,
1950+ static_context* sctx,
1951+ const QueryLoc& loc,
1952+ std::vector<PlanIter_t>& argv,
1953+ expr& ann) const
1954+{
1955+ return new FnUnparsedTextIterator(sctx, loc, argv);
1956+}
1957+
1958+PlanIter_t fn_unparsed_text_available::codegen(
1959+ CompilerCB*,
1960+ static_context* sctx,
1961+ const QueryLoc& loc,
1962+ std::vector<PlanIter_t>& argv,
1963+ expr& ann) const
1964+{
1965+ return new FnUnparsedTextAvailableIterator(sctx, loc, argv);
1966+}
1967+
1968+void populate_context_access(static_context* sctx)
1969+{
1970+ {
1971+
1972+
1973+ DECL_WITH_KIND(sctx, fn_unparsed_text,
1974+ (createQName("http://www.w3.org/2005/xpath-functions","","unparsed-text"),
1975+ GENV_TYPESYSTEM.STRING_TYPE_QUESTION,
1976+ GENV_TYPESYSTEM.STRING_TYPE_QUESTION),
1977+ FunctionConsts::FN_UNPARSED_TEXT_1);
1978+
1979+ }
1980+
1981+
1982+ {
1983+
1984+
1985+ DECL_WITH_KIND(sctx, fn_unparsed_text,
1986+ (createQName("http://www.w3.org/2005/xpath-functions","","unparsed-text"),
1987+ GENV_TYPESYSTEM.STRING_TYPE_QUESTION,
1988+ GENV_TYPESYSTEM.STRING_TYPE_ONE,
1989+ GENV_TYPESYSTEM.STRING_TYPE_QUESTION),
1990+ FunctionConsts::FN_UNPARSED_TEXT_2);
1991+
1992+ }
1993+
1994+
1995+ {
1996+
1997+
1998+ DECL_WITH_KIND(sctx, fn_unparsed_text_available,
1999+ (createQName("http://www.w3.org/2005/xpath-functions","","unparsed-text-available"),
2000+ GENV_TYPESYSTEM.STRING_TYPE_QUESTION,
2001+ GENV_TYPESYSTEM.STRING_TYPE_QUESTION),
2002+ FunctionConsts::FN_UNPARSED_TEXT_AVAILABLE_1);
2003+
2004+ }
2005+
2006+
2007+ {
2008+
2009+
2010+ DECL_WITH_KIND(sctx, fn_unparsed_text_available,
2011+ (createQName("http://www.w3.org/2005/xpath-functions","","unparsed-text-available"),
2012+ GENV_TYPESYSTEM.STRING_TYPE_QUESTION,
2013+ GENV_TYPESYSTEM.STRING_TYPE_ONE,
2014+ GENV_TYPESYSTEM.STRING_TYPE_QUESTION),
2015+ FunctionConsts::FN_UNPARSED_TEXT_AVAILABLE_2);
2016+
2017+ }
2018+
2019+}
2020+
2021+
2022+}
2023+
2024+
2025+
2026
2027=== added file 'src/functions/pregenerated/func_access.h'
2028--- src/functions/pregenerated/func_access.h 1970-01-01 00:00:00 +0000
2029+++ src/functions/pregenerated/func_access.h 2012-04-13 09:46:19 +0000
2030@@ -0,0 +1,79 @@
2031+/*
2032+ * Copyright 2006-2008 The FLWOR Foundation.
2033+ *
2034+ * Licensed under the Apache License, Version 2.0 (the "License");
2035+ * you may not use this file except in compliance with the License.
2036+ * You may obtain a copy of the License at
2037+ *
2038+ * http://www.apache.org/licenses/LICENSE-2.0
2039+ *
2040+ * Unless required by applicable law or agreed to in writing, software
2041+ * distributed under the License is distributed on an "AS IS" BASIS,
2042+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2043+ * See the License for the specific language governing permissions and
2044+ * limitations under the License.
2045+ */
2046+
2047+// ******************************************
2048+// * *
2049+// * THIS IS A GENERATED FILE. DO NOT EDIT! *
2050+// * SEE .xml FILE WITH SAME NAME *
2051+// * *
2052+// ******************************************
2053+
2054+
2055+#ifndef ZORBA_FUNCTIONS_ACCESS_H
2056+#define ZORBA_FUNCTIONS_ACCESS_H
2057+
2058+
2059+#include "common/shared_types.h"
2060+#include "functions/function_impl.h"
2061+
2062+
2063+namespace zorba {
2064+
2065+
2066+void populate_context_access(static_context* sctx);
2067+
2068+
2069+
2070+
2071+//fn:unparsed-text
2072+class fn_unparsed_text : public function
2073+{
2074+public:
2075+ fn_unparsed_text(const signature& sig, FunctionConsts::FunctionKind kind)
2076+ :
2077+ function(sig, kind)
2078+ {
2079+
2080+ }
2081+
2082+ CODEGEN_DECL();
2083+};
2084+
2085+
2086+//fn:unparsed-text-available
2087+class fn_unparsed_text_available : public function
2088+{
2089+public:
2090+ fn_unparsed_text_available(const signature& sig, FunctionConsts::FunctionKind kind)
2091+ :
2092+ function(sig, kind)
2093+ {
2094+
2095+ }
2096+
2097+ CODEGEN_DECL();
2098+};
2099+
2100+
2101+} //namespace zorba
2102+
2103+
2104+#endif
2105+/*
2106+ * Local variables:
2107+ * mode: c++
2108+ * End:
2109+ */
2110
2111=== modified file 'src/functions/pregenerated/func_collections.cpp'
2112--- src/functions/pregenerated/func_collections.cpp 2012-03-28 23:58:23 +0000
2113+++ src/functions/pregenerated/func_collections.cpp 2012-04-13 09:46:19 +0000
2114@@ -171,6 +171,16 @@
2115 return new DeclaredICsIterator(sctx, loc, argv);
2116 }
2117
2118+PlanIter_t fn_uri_collection::codegen(
2119+ CompilerCB*,
2120+ static_context* sctx,
2121+ const QueryLoc& loc,
2122+ std::vector<PlanIter_t>& argv,
2123+ expr& ann) const
2124+{
2125+ return new FnURICollectionIterator(sctx, loc, argv);
2126+}
2127+
2128 void populate_context_collections(static_context* sctx)
2129 {
2130 {
2131@@ -892,6 +902,29 @@
2132
2133 }
2134
2135+
2136+ {
2137+
2138+
2139+ DECL_WITH_KIND(sctx, fn_uri_collection,
2140+ (createQName("http://www.w3.org/2005/xpath-functions","","uri-collection"),
2141+ GENV_TYPESYSTEM.ANY_URI_TYPE_STAR),
2142+ FunctionConsts::FN_URI_COLLECTION_0);
2143+
2144+ }
2145+
2146+
2147+ {
2148+
2149+
2150+ DECL_WITH_KIND(sctx, fn_uri_collection,
2151+ (createQName("http://www.w3.org/2005/xpath-functions","","uri-collection"),
2152+ GENV_TYPESYSTEM.STRING_TYPE_QUESTION,
2153+ GENV_TYPESYSTEM.ANY_URI_TYPE_STAR),
2154+ FunctionConsts::FN_URI_COLLECTION_1);
2155+
2156+ }
2157+
2158 }
2159
2160
2161
2162=== modified file 'src/functions/pregenerated/func_collections.h'
2163--- src/functions/pregenerated/func_collections.h 2012-03-28 23:58:23 +0000
2164+++ src/functions/pregenerated/func_collections.h 2012-04-13 09:46:19 +0000
2165@@ -664,6 +664,21 @@
2166 };
2167
2168
2169+//fn:uri-collection
2170+class fn_uri_collection : public function
2171+{
2172+public:
2173+ fn_uri_collection(const signature& sig, FunctionConsts::FunctionKind kind)
2174+ :
2175+ function(sig, kind)
2176+ {
2177+
2178+ }
2179+
2180+ CODEGEN_DECL();
2181+};
2182+
2183+
2184 } //namespace zorba
2185
2186
2187
2188=== modified file 'src/functions/pregenerated/func_sequences.cpp'
2189--- src/functions/pregenerated/func_sequences.cpp 2012-03-28 23:58:23 +0000
2190+++ src/functions/pregenerated/func_sequences.cpp 2012-04-13 09:46:19 +0000
2191@@ -259,6 +259,56 @@
2192 return new FnDocAvailableIterator(sctx, loc, argv);
2193 }
2194
2195+PlanIter_t fn_available_environment_variables::codegen(
2196+ CompilerCB*,
2197+ static_context* sctx,
2198+ const QueryLoc& loc,
2199+ std::vector<PlanIter_t>& argv,
2200+ expr& ann) const
2201+{
2202+ return new FnAvailableEnvironmentVariablesIterator(sctx, loc, argv);
2203+}
2204+
2205+PlanIter_t fn_environment_variable::codegen(
2206+ CompilerCB*,
2207+ static_context* sctx,
2208+ const QueryLoc& loc,
2209+ std::vector<PlanIter_t>& argv,
2210+ expr& ann) const
2211+{
2212+ return new FnEnvironmentVariableIterator(sctx, loc, argv);
2213+}
2214+
2215+PlanIter_t fn_unparsed_text::codegen(
2216+ CompilerCB*,
2217+ static_context* sctx,
2218+ const QueryLoc& loc,
2219+ std::vector<PlanIter_t>& argv,
2220+ expr& ann) const
2221+{
2222+ return new FnUnparsedTextIterator(sctx, loc, argv);
2223+}
2224+
2225+PlanIter_t fn_unparsed_text_available::codegen(
2226+ CompilerCB*,
2227+ static_context* sctx,
2228+ const QueryLoc& loc,
2229+ std::vector<PlanIter_t>& argv,
2230+ expr& ann) const
2231+{
2232+ return new FnUnparsedTextAvailableIterator(sctx, loc, argv);
2233+}
2234+
2235+PlanIter_t fn_unparsed_text_lines::codegen(
2236+ CompilerCB*,
2237+ static_context* sctx,
2238+ const QueryLoc& loc,
2239+ std::vector<PlanIter_t>& argv,
2240+ expr& ann) const
2241+{
2242+ return new FnUnparsedTextLinesIterator(sctx, loc, argv);
2243+}
2244+
2245 void populate_context_sequences(static_context* sctx)
2246 {
2247 {
2248@@ -766,6 +816,104 @@
2249
2250 }
2251
2252+
2253+ {
2254+
2255+
2256+ DECL_WITH_KIND(sctx, fn_available_environment_variables,
2257+ (createQName("http://www.w3.org/2005/xpath-functions","","available-environment-variables"),
2258+ GENV_TYPESYSTEM.STRING_TYPE_STAR),
2259+ FunctionConsts::FN_AVAILABLE_ENVIRONMENT_VARIABLES_0);
2260+
2261+ }
2262+
2263+
2264+ {
2265+
2266+
2267+ DECL_WITH_KIND(sctx, fn_environment_variable,
2268+ (createQName("http://www.w3.org/2005/xpath-functions","","environment-variable"),
2269+ GENV_TYPESYSTEM.STRING_TYPE_ONE,
2270+ GENV_TYPESYSTEM.STRING_TYPE_QUESTION),
2271+ FunctionConsts::FN_ENVIRONMENT_VARIABLE_1);
2272+
2273+ }
2274+
2275+
2276+ {
2277+
2278+
2279+ DECL_WITH_KIND(sctx, fn_unparsed_text,
2280+ (createQName("http://www.w3.org/2005/xpath-functions","","unparsed-text"),
2281+ GENV_TYPESYSTEM.STRING_TYPE_QUESTION,
2282+ GENV_TYPESYSTEM.STRING_TYPE_QUESTION),
2283+ FunctionConsts::FN_UNPARSED_TEXT_1);
2284+
2285+ }
2286+
2287+
2288+ {
2289+
2290+
2291+ DECL_WITH_KIND(sctx, fn_unparsed_text,
2292+ (createQName("http://www.w3.org/2005/xpath-functions","","unparsed-text"),
2293+ GENV_TYPESYSTEM.STRING_TYPE_QUESTION,
2294+ GENV_TYPESYSTEM.STRING_TYPE_ONE,
2295+ GENV_TYPESYSTEM.STRING_TYPE_QUESTION),
2296+ FunctionConsts::FN_UNPARSED_TEXT_2);
2297+
2298+ }
2299+
2300+
2301+ {
2302+
2303+
2304+ DECL_WITH_KIND(sctx, fn_unparsed_text_available,
2305+ (createQName("http://www.w3.org/2005/xpath-functions","","unparsed-text-available"),
2306+ GENV_TYPESYSTEM.STRING_TYPE_QUESTION,
2307+ GENV_TYPESYSTEM.STRING_TYPE_QUESTION),
2308+ FunctionConsts::FN_UNPARSED_TEXT_AVAILABLE_1);
2309+
2310+ }
2311+
2312+
2313+ {
2314+
2315+
2316+ DECL_WITH_KIND(sctx, fn_unparsed_text_available,
2317+ (createQName("http://www.w3.org/2005/xpath-functions","","unparsed-text-available"),
2318+ GENV_TYPESYSTEM.STRING_TYPE_QUESTION,
2319+ GENV_TYPESYSTEM.STRING_TYPE_ONE,
2320+ GENV_TYPESYSTEM.STRING_TYPE_QUESTION),
2321+ FunctionConsts::FN_UNPARSED_TEXT_AVAILABLE_2);
2322+
2323+ }
2324+
2325+
2326+ {
2327+
2328+
2329+ DECL_WITH_KIND(sctx, fn_unparsed_text_lines,
2330+ (createQName("http://www.w3.org/2005/xpath-functions","","unparsed-text-lines"),
2331+ GENV_TYPESYSTEM.STRING_TYPE_QUESTION,
2332+ GENV_TYPESYSTEM.STRING_TYPE_STAR),
2333+ FunctionConsts::FN_UNPARSED_TEXT_LINES_1);
2334+
2335+ }
2336+
2337+
2338+ {
2339+
2340+
2341+ DECL_WITH_KIND(sctx, fn_unparsed_text_lines,
2342+ (createQName("http://www.w3.org/2005/xpath-functions","","unparsed-text-lines"),
2343+ GENV_TYPESYSTEM.STRING_TYPE_QUESTION,
2344+ GENV_TYPESYSTEM.STRING_TYPE_ONE,
2345+ GENV_TYPESYSTEM.STRING_TYPE_STAR),
2346+ FunctionConsts::FN_UNPARSED_TEXT_LINES_2);
2347+
2348+ }
2349+
2350 }
2351
2352
2353
2354=== modified file 'src/functions/pregenerated/func_sequences.h'
2355--- src/functions/pregenerated/func_sequences.h 2012-03-28 23:58:23 +0000
2356+++ src/functions/pregenerated/func_sequences.h 2012-04-13 09:46:19 +0000
2357@@ -622,6 +622,81 @@
2358 };
2359
2360
2361+//fn:available-environment-variables
2362+class fn_available_environment_variables : public function
2363+{
2364+public:
2365+ fn_available_environment_variables(const signature& sig, FunctionConsts::FunctionKind kind)
2366+ :
2367+ function(sig, kind)
2368+ {
2369+
2370+ }
2371+
2372+ CODEGEN_DECL();
2373+};
2374+
2375+
2376+//fn:environment-variable
2377+class fn_environment_variable : public function
2378+{
2379+public:
2380+ fn_environment_variable(const signature& sig, FunctionConsts::FunctionKind kind)
2381+ :
2382+ function(sig, kind)
2383+ {
2384+
2385+ }
2386+
2387+ CODEGEN_DECL();
2388+};
2389+
2390+
2391+//fn:unparsed-text
2392+class fn_unparsed_text : public function
2393+{
2394+public:
2395+ fn_unparsed_text(const signature& sig, FunctionConsts::FunctionKind kind)
2396+ :
2397+ function(sig, kind)
2398+ {
2399+
2400+ }
2401+
2402+ CODEGEN_DECL();
2403+};
2404+
2405+
2406+//fn:unparsed-text-available
2407+class fn_unparsed_text_available : public function
2408+{
2409+public:
2410+ fn_unparsed_text_available(const signature& sig, FunctionConsts::FunctionKind kind)
2411+ :
2412+ function(sig, kind)
2413+ {
2414+
2415+ }
2416+
2417+ CODEGEN_DECL();
2418+};
2419+
2420+
2421+//fn:unparsed-text-lines
2422+class fn_unparsed_text_lines : public function
2423+{
2424+public:
2425+ fn_unparsed_text_lines(const signature& sig, FunctionConsts::FunctionKind kind)
2426+ :
2427+ function(sig, kind)
2428+ {
2429+
2430+ }
2431+
2432+ CODEGEN_DECL();
2433+};
2434+
2435+
2436 } //namespace zorba
2437
2438
2439
2440=== modified file 'src/functions/pregenerated/function_enum.h'
2441--- src/functions/pregenerated/function_enum.h 2012-03-28 05:19:57 +0000
2442+++ src/functions/pregenerated/function_enum.h 2012-04-13 09:46:19 +0000
2443@@ -97,6 +97,8 @@
2444 ZORBA_STORE_INDEXES_STATIC_DDL_DECLARED_INDEXES_0,
2445 ZORBA_STORE_INTEGRITY_CONSTRAINTS_STATIC_DDL_IS_DECLARED_INTEGRITY_CONSTRAINT_1,
2446 ZORBA_STORE_INTEGRITY_CONSTRAINTS_STATIC_DDL_DECLARED_INTEGRITY_CONSTRAINTS_0,
2447+ FN_URI_COLLECTION_0,
2448+ FN_URI_COLLECTION_1,
2449 FN_CURRENT_DATETIME_0,
2450 FN_CURRENT_DATE_0,
2451 FN_CURRENT_TIME_0,
2452@@ -317,6 +319,14 @@
2453 FN_IDREF_2,
2454 FN_DOC_1,
2455 FN_DOC_AVAILABLE_1,
2456+ FN_AVAILABLE_ENVIRONMENT_VARIABLES_0,
2457+ FN_ENVIRONMENT_VARIABLE_1,
2458+ FN_UNPARSED_TEXT_1,
2459+ FN_UNPARSED_TEXT_2,
2460+ FN_UNPARSED_TEXT_AVAILABLE_1,
2461+ FN_UNPARSED_TEXT_AVAILABLE_2,
2462+ FN_UNPARSED_TEXT_LINES_1,
2463+ FN_UNPARSED_TEXT_LINES_2,
2464 ZORBA_STORE_DOCUMENTS_PUT_2,
2465 ZORBA_STORE_DOCUMENTS_REMOVE_1,
2466 ZORBA_STORE_DOCUMENTS_DOCUMENT_1,
2467
2468=== modified file 'src/runtime/collections/collections_impl.cpp'
2469--- src/runtime/collections/collections_impl.cpp 2012-04-13 09:17:58 +0000
2470+++ src/runtime/collections/collections_impl.cpp 2012-04-13 09:46:19 +0000
2471@@ -2493,5 +2493,127 @@
2472 STACK_END(lState);
2473 }
2474
2475+
2476+/*******************************************************************************
2477+ 14.8.5 fn:uri-collection
2478+********************************************************************************/
2479+ FnURICollectionIteratorState::~FnURICollectionIteratorState()
2480+ {
2481+ if(theIterator != NULL)
2482+ {
2483+ if(theIteratorOpened)
2484+ {
2485+ theIterator->close();
2486+ theIteratorOpened = false;
2487+ }
2488+ theIterator = NULL;
2489+ }
2490+ }
2491+
2492+ void FnURICollectionIteratorState::init(PlanState& planState)
2493+ {
2494+ PlanIteratorState::init(planState);
2495+ theIterator = NULL;
2496+ }
2497+
2498+ void FnURICollectionIteratorState::reset(PlanState& planState)
2499+ {
2500+ PlanIteratorState::reset(planState);
2501+
2502+ if(theIterator != NULL)
2503+ {
2504+ if(theIteratorOpened)
2505+ {
2506+ theIterator->close();
2507+ theIteratorOpened = false;
2508+ }
2509+ theIterator = NULL;
2510+ }
2511+ }
2512+
2513+ bool FnURICollectionIterator::nextImpl(store::Item_t& result, PlanState& planState) const
2514+ {
2515+ store::Item_t lURI, resolvedURIItem, lIte;
2516+ store::Collection_t coll;
2517+ std::auto_ptr<internal::Resource> lResource;
2518+ internal::CollectionResource* lCollResource;
2519+ zstring resolvedURIString;
2520+ zstring lErrorMessage;
2521+ zstring docuri;
2522+
2523+ FnURICollectionIteratorState* state;
2524+ DEFAULT_STACK_INIT(FnURICollectionIteratorState, state, planState);
2525+
2526+ if(theChildren.size() == 1 &&
2527+ consumeNext(lURI, theChildren[0].getp(),planState))
2528+ {
2529+ try
2530+ {
2531+ resolvedURIString= theSctx->resolve_relative_uri(lURI->getStringValue());
2532+ }
2533+ catch (ZorbaException const&)
2534+ {
2535+ throw XQUERY_EXCEPTION(
2536+ err::FODC0004,
2537+ ERROR_PARAMS(lURI->getStringValue(), ZED( BadAnyURI ) ),
2538+ ERROR_LOC( loc )
2539+ );
2540+ }
2541+ }
2542+ else
2543+ {
2544+ resolvedURIItem = planState.theGlobalDynCtx->get_default_collection();
2545+
2546+ if ( NULL == resolvedURIItem )
2547+ throw XQUERY_EXCEPTION(
2548+ err::FODC0002,
2549+ ERROR_PARAMS( ZED( DefaultCollection), ZED( NotDefInDynamicCtx ) ),
2550+ ERROR_LOC( loc )
2551+ );
2552+
2553+ resolvedURIString = theSctx->resolve_relative_uri(resolvedURIItem->getStringValue());
2554+ }
2555+
2556+ lResource = theSctx->resolve_uri(resolvedURIString,
2557+ internal::EntityData::COLLECTION,
2558+ lErrorMessage);
2559+
2560+ lCollResource = dynamic_cast<internal::CollectionResource*>(lResource.get());
2561+
2562+ if( lCollResource == 0 || !(coll = lCollResource->getCollection()) )
2563+ {
2564+ throw XQUERY_EXCEPTION(
2565+ err::FODC0002,
2566+ ERROR_PARAMS( resolvedURIString, lErrorMessage ),
2567+ ERROR_LOC( loc )
2568+ );
2569+ }
2570+
2571+ // return collection nodes
2572+ state->theIterator = coll->getIterator();
2573+ ZORBA_ASSERT(state->theIterator != NULL);
2574+ state->theIterator->open();
2575+ state->theIteratorOpened = true;
2576+
2577+ //return the DocumentURI of the Collection
2578+ while(state->theIterator->next(lIte))
2579+ {
2580+ lIte->getDocumentURI(docuri);
2581+ if(!docuri.empty())
2582+ {
2583+ STACK_PUSH(GENV_ITEMFACTORY->createAnyURI(result, docuri), state);
2584+ }
2585+ }
2586+
2587+ //close iterator
2588+ state->theIterator->close();
2589+ state->theIteratorOpened = false;
2590+
2591+ STACK_PUSH(false, state);
2592+ STACK_END(state);
2593+
2594+ }
2595+
2596+
2597 } // namespace zorba
2598 /* vim:set et sw=2 ts=2: */
2599
2600=== modified file 'src/runtime/collections/pregenerated/collections.cpp'
2601--- src/runtime/collections/pregenerated/collections.cpp 2012-04-08 21:39:25 +0000
2602+++ src/runtime/collections/pregenerated/collections.cpp 2012-04-13 09:46:19 +0000
2603@@ -773,6 +773,30 @@
2604 // </DeclaredICsIterator>
2605
2606
2607+// <FnURICollectionIterator>
2608+FnURICollectionIterator::class_factory<FnURICollectionIterator>
2609+FnURICollectionIterator::g_class_factory;
2610+
2611+
2612+void FnURICollectionIterator::accept(PlanIterVisitor& v) const {
2613+ v.beginVisit(*this);
2614+
2615+ std::vector<PlanIter_t>::const_iterator lIter = theChildren.begin();
2616+ std::vector<PlanIter_t>::const_iterator lEnd = theChildren.end();
2617+ for ( ; lIter != lEnd; ++lIter ){
2618+ (*lIter)->accept(v);
2619+ }
2620+
2621+ v.endVisit(*this);
2622+}
2623+
2624+FnURICollectionIterator::~FnURICollectionIterator() {}
2625+
2626+FnURICollectionIteratorState::FnURICollectionIteratorState() {}
2627+
2628+// </FnURICollectionIterator>
2629+
2630+
2631
2632 }
2633
2634
2635=== modified file 'src/runtime/collections/pregenerated/collections.h'
2636--- src/runtime/collections/pregenerated/collections.h 2012-03-28 23:58:23 +0000
2637+++ src/runtime/collections/pregenerated/collections.h 2012-04-13 09:46:19 +0000
2638@@ -1467,6 +1467,57 @@
2639 };
2640
2641
2642+/**
2643+ *
2644+ * Returns a sequence of xs:anyURI values representing the document URIs of the
2645+ * documents in a collection.
2646+ *
2647+ * Author: Zorba Team
2648+ */
2649+class FnURICollectionIteratorState : public PlanIteratorState
2650+{
2651+public:
2652+ store::Iterator_t theIterator; //the current iterator
2653+ bool theIteratorOpened; //flag indicating whether theIterator was opened
2654+
2655+ FnURICollectionIteratorState();
2656+
2657+ ~FnURICollectionIteratorState();
2658+
2659+ void init(PlanState&);
2660+ void reset(PlanState&);
2661+};
2662+
2663+class FnURICollectionIterator : public NaryBaseIterator<FnURICollectionIterator, FnURICollectionIteratorState>
2664+{
2665+public:
2666+ SERIALIZABLE_CLASS(FnURICollectionIterator);
2667+
2668+ SERIALIZABLE_CLASS_CONSTRUCTOR2T(FnURICollectionIterator,
2669+ NaryBaseIterator<FnURICollectionIterator, FnURICollectionIteratorState>);
2670+
2671+ void serialize( ::zorba::serialization::Archiver& ar)
2672+ {
2673+ serialize_baseclass(ar,
2674+ (NaryBaseIterator<FnURICollectionIterator, FnURICollectionIteratorState>*)this);
2675+ }
2676+
2677+ FnURICollectionIterator(
2678+ static_context* sctx,
2679+ const QueryLoc& loc,
2680+ std::vector<PlanIter_t>& children)
2681+ :
2682+ NaryBaseIterator<FnURICollectionIterator, FnURICollectionIteratorState>(sctx, loc, children)
2683+ {}
2684+
2685+ virtual ~FnURICollectionIterator();
2686+
2687+ void accept(PlanIterVisitor& v) const;
2688+
2689+ bool nextImpl(store::Item_t& result, PlanState& aPlanState) const;
2690+};
2691+
2692+
2693 }
2694 #endif
2695 /*
2696
2697=== modified file 'src/runtime/sequences/pregenerated/sequences.cpp'
2698--- src/runtime/sequences/pregenerated/sequences.cpp 2012-04-08 21:39:25 +0000
2699+++ src/runtime/sequences/pregenerated/sequences.cpp 2012-04-13 09:46:19 +0000
2700@@ -840,6 +840,122 @@
2701 // </FnDocAvailableIterator>
2702
2703
2704+// <FnAvailableEnvironmentVariablesIterator>
2705+FnAvailableEnvironmentVariablesIterator::class_factory<FnAvailableEnvironmentVariablesIterator>
2706+FnAvailableEnvironmentVariablesIterator::g_class_factory;
2707+
2708+
2709+void FnAvailableEnvironmentVariablesIterator::accept(PlanIterVisitor& v) const {
2710+ v.beginVisit(*this);
2711+
2712+ std::vector<PlanIter_t>::const_iterator lIter = theChildren.begin();
2713+ std::vector<PlanIter_t>::const_iterator lEnd = theChildren.end();
2714+ for ( ; lIter != lEnd; ++lIter ){
2715+ (*lIter)->accept(v);
2716+ }
2717+
2718+ v.endVisit(*this);
2719+}
2720+
2721+FnAvailableEnvironmentVariablesIterator::~FnAvailableEnvironmentVariablesIterator() {}
2722+
2723+FnAvailableEnvironmentVariablesIteratorState::FnAvailableEnvironmentVariablesIteratorState() {}
2724+
2725+FnAvailableEnvironmentVariablesIteratorState::~FnAvailableEnvironmentVariablesIteratorState() {}
2726+
2727+// </FnAvailableEnvironmentVariablesIterator>
2728+
2729+
2730+// <FnEnvironmentVariableIterator>
2731+FnEnvironmentVariableIterator::class_factory<FnEnvironmentVariableIterator>
2732+FnEnvironmentVariableIterator::g_class_factory;
2733+
2734+
2735+void FnEnvironmentVariableIterator::accept(PlanIterVisitor& v) const {
2736+ v.beginVisit(*this);
2737+
2738+ std::vector<PlanIter_t>::const_iterator lIter = theChildren.begin();
2739+ std::vector<PlanIter_t>::const_iterator lEnd = theChildren.end();
2740+ for ( ; lIter != lEnd; ++lIter ){
2741+ (*lIter)->accept(v);
2742+ }
2743+
2744+ v.endVisit(*this);
2745+}
2746+
2747+FnEnvironmentVariableIterator::~FnEnvironmentVariableIterator() {}
2748+
2749+// </FnEnvironmentVariableIterator>
2750+
2751+
2752+// <FnUnparsedTextIterator>
2753+FnUnparsedTextIterator::class_factory<FnUnparsedTextIterator>
2754+FnUnparsedTextIterator::g_class_factory;
2755+
2756+
2757+void FnUnparsedTextIterator::accept(PlanIterVisitor& v) const {
2758+ v.beginVisit(*this);
2759+
2760+ std::vector<PlanIter_t>::const_iterator lIter = theChildren.begin();
2761+ std::vector<PlanIter_t>::const_iterator lEnd = theChildren.end();
2762+ for ( ; lIter != lEnd; ++lIter ){
2763+ (*lIter)->accept(v);
2764+ }
2765+
2766+ v.endVisit(*this);
2767+}
2768+
2769+FnUnparsedTextIterator::~FnUnparsedTextIterator() {}
2770+
2771+// </FnUnparsedTextIterator>
2772+
2773+
2774+// <FnUnparsedTextAvailableIterator>
2775+FnUnparsedTextAvailableIterator::class_factory<FnUnparsedTextAvailableIterator>
2776+FnUnparsedTextAvailableIterator::g_class_factory;
2777+
2778+
2779+void FnUnparsedTextAvailableIterator::accept(PlanIterVisitor& v) const {
2780+ v.beginVisit(*this);
2781+
2782+ std::vector<PlanIter_t>::const_iterator lIter = theChildren.begin();
2783+ std::vector<PlanIter_t>::const_iterator lEnd = theChildren.end();
2784+ for ( ; lIter != lEnd; ++lIter ){
2785+ (*lIter)->accept(v);
2786+ }
2787+
2788+ v.endVisit(*this);
2789+}
2790+
2791+FnUnparsedTextAvailableIterator::~FnUnparsedTextAvailableIterator() {}
2792+
2793+// </FnUnparsedTextAvailableIterator>
2794+
2795+
2796+// <FnUnparsedTextLinesIterator>
2797+FnUnparsedTextLinesIterator::class_factory<FnUnparsedTextLinesIterator>
2798+FnUnparsedTextLinesIterator::g_class_factory;
2799+
2800+
2801+void FnUnparsedTextLinesIterator::accept(PlanIterVisitor& v) const {
2802+ v.beginVisit(*this);
2803+
2804+ std::vector<PlanIter_t>::const_iterator lIter = theChildren.begin();
2805+ std::vector<PlanIter_t>::const_iterator lEnd = theChildren.end();
2806+ for ( ; lIter != lEnd; ++lIter ){
2807+ (*lIter)->accept(v);
2808+ }
2809+
2810+ v.endVisit(*this);
2811+}
2812+
2813+FnUnparsedTextLinesIterator::~FnUnparsedTextLinesIterator() {}
2814+
2815+FnUnparsedTextLinesIteratorState::FnUnparsedTextLinesIteratorState() {}
2816+
2817+// </FnUnparsedTextLinesIterator>
2818+
2819+
2820
2821 }
2822
2823
2824=== modified file 'src/runtime/sequences/pregenerated/sequences.h'
2825--- src/runtime/sequences/pregenerated/sequences.h 2012-03-28 05:19:57 +0000
2826+++ src/runtime/sequences/pregenerated/sequences.h 2012-04-13 09:46:19 +0000
2827@@ -1394,6 +1394,225 @@
2828 };
2829
2830
2831+/**
2832+ *
2833+ * Summary: returns a list of environment variable names that are suitable for
2834+ * passing to fn:environment-variable, as a (possible empty) sequence of
2835+ * strings.
2836+ *
2837+ * The function returns a sequence of strings, being the names of the environment
2838+ * variables in the dynamic context in some implementation-defined order.
2839+ *
2840+ * Author: Zorba Team
2841+ */
2842+class FnAvailableEnvironmentVariablesIteratorState : public PlanIteratorState
2843+{
2844+public:
2845+ store::Iterator_t theIterator; //the current iterator
2846+
2847+ FnAvailableEnvironmentVariablesIteratorState();
2848+
2849+ ~FnAvailableEnvironmentVariablesIteratorState();
2850+
2851+ void init(PlanState&);
2852+ void reset(PlanState&);
2853+};
2854+
2855+class FnAvailableEnvironmentVariablesIterator : public NaryBaseIterator<FnAvailableEnvironmentVariablesIterator, FnAvailableEnvironmentVariablesIteratorState>
2856+{
2857+public:
2858+ SERIALIZABLE_CLASS(FnAvailableEnvironmentVariablesIterator);
2859+
2860+ SERIALIZABLE_CLASS_CONSTRUCTOR2T(FnAvailableEnvironmentVariablesIterator,
2861+ NaryBaseIterator<FnAvailableEnvironmentVariablesIterator, FnAvailableEnvironmentVariablesIteratorState>);
2862+
2863+ void serialize( ::zorba::serialization::Archiver& ar)
2864+ {
2865+ serialize_baseclass(ar,
2866+ (NaryBaseIterator<FnAvailableEnvironmentVariablesIterator, FnAvailableEnvironmentVariablesIteratorState>*)this);
2867+ }
2868+
2869+ FnAvailableEnvironmentVariablesIterator(
2870+ static_context* sctx,
2871+ const QueryLoc& loc,
2872+ std::vector<PlanIter_t>& children)
2873+ :
2874+ NaryBaseIterator<FnAvailableEnvironmentVariablesIterator, FnAvailableEnvironmentVariablesIteratorState>(sctx, loc, children)
2875+ {}
2876+
2877+ virtual ~FnAvailableEnvironmentVariablesIterator();
2878+
2879+ void accept(PlanIterVisitor& v) const;
2880+
2881+ bool nextImpl(store::Item_t& result, PlanState& aPlanState) const;
2882+};
2883+
2884+
2885+/**
2886+ *
2887+ * Summary: Returns the value of a system environment variable, if it exists.
2888+ *
2889+ * If there is no environment variable with a matching name, the function returns
2890+ * the empty sequence.
2891+ *
2892+ * Author: Zorba Team
2893+ */
2894+class FnEnvironmentVariableIterator : public NaryBaseIterator<FnEnvironmentVariableIterator, PlanIteratorState>
2895+{
2896+public:
2897+ SERIALIZABLE_CLASS(FnEnvironmentVariableIterator);
2898+
2899+ SERIALIZABLE_CLASS_CONSTRUCTOR2T(FnEnvironmentVariableIterator,
2900+ NaryBaseIterator<FnEnvironmentVariableIterator, PlanIteratorState>);
2901+
2902+ void serialize( ::zorba::serialization::Archiver& ar)
2903+ {
2904+ serialize_baseclass(ar,
2905+ (NaryBaseIterator<FnEnvironmentVariableIterator, PlanIteratorState>*)this);
2906+ }
2907+
2908+ FnEnvironmentVariableIterator(
2909+ static_context* sctx,
2910+ const QueryLoc& loc,
2911+ std::vector<PlanIter_t>& children)
2912+ :
2913+ NaryBaseIterator<FnEnvironmentVariableIterator, PlanIteratorState>(sctx, loc, children)
2914+ {}
2915+
2916+ virtual ~FnEnvironmentVariableIterator();
2917+
2918+ void accept(PlanIterVisitor& v) const;
2919+
2920+ bool nextImpl(store::Item_t& result, PlanState& aPlanState) const;
2921+};
2922+
2923+
2924+/**
2925+ *
2926+ * Summary: The fn:unparsed-text function reads an external resource (for
2927+ * example, a file) and returns its contents as a string.
2928+ *
2929+ * Author: Zorba Team
2930+ */
2931+class FnUnparsedTextIterator : public NaryBaseIterator<FnUnparsedTextIterator, PlanIteratorState>
2932+{
2933+public:
2934+ SERIALIZABLE_CLASS(FnUnparsedTextIterator);
2935+
2936+ SERIALIZABLE_CLASS_CONSTRUCTOR2T(FnUnparsedTextIterator,
2937+ NaryBaseIterator<FnUnparsedTextIterator, PlanIteratorState>);
2938+
2939+ void serialize( ::zorba::serialization::Archiver& ar)
2940+ {
2941+ serialize_baseclass(ar,
2942+ (NaryBaseIterator<FnUnparsedTextIterator, PlanIteratorState>*)this);
2943+ }
2944+
2945+ FnUnparsedTextIterator(
2946+ static_context* sctx,
2947+ const QueryLoc& loc,
2948+ std::vector<PlanIter_t>& children)
2949+ :
2950+ NaryBaseIterator<FnUnparsedTextIterator, PlanIteratorState>(sctx, loc, children)
2951+ {}
2952+
2953+ virtual ~FnUnparsedTextIterator();
2954+
2955+ void accept(PlanIterVisitor& v) const;
2956+
2957+ bool nextImpl(store::Item_t& result, PlanState& aPlanState) const;
2958+};
2959+
2960+
2961+/**
2962+ *
2963+ * Because errors in evaluating the fn:unparsed-text function are
2964+ * non-recoverable, these two functions are provided to allow an application
2965+ * to determine whether a call with particular arguments would succeed.
2966+ *
2967+ * Author: Zorba Team
2968+ */
2969+class FnUnparsedTextAvailableIterator : public NaryBaseIterator<FnUnparsedTextAvailableIterator, PlanIteratorState>
2970+{
2971+public:
2972+ SERIALIZABLE_CLASS(FnUnparsedTextAvailableIterator);
2973+
2974+ SERIALIZABLE_CLASS_CONSTRUCTOR2T(FnUnparsedTextAvailableIterator,
2975+ NaryBaseIterator<FnUnparsedTextAvailableIterator, PlanIteratorState>);
2976+
2977+ void serialize( ::zorba::serialization::Archiver& ar)
2978+ {
2979+ serialize_baseclass(ar,
2980+ (NaryBaseIterator<FnUnparsedTextAvailableIterator, PlanIteratorState>*)this);
2981+ }
2982+
2983+ FnUnparsedTextAvailableIterator(
2984+ static_context* sctx,
2985+ const QueryLoc& loc,
2986+ std::vector<PlanIter_t>& children)
2987+ :
2988+ NaryBaseIterator<FnUnparsedTextAvailableIterator, PlanIteratorState>(sctx, loc, children)
2989+ {}
2990+
2991+ virtual ~FnUnparsedTextAvailableIterator();
2992+
2993+ void accept(PlanIterVisitor& v) const;
2994+
2995+ bool nextImpl(store::Item_t& result, PlanState& aPlanState) const;
2996+};
2997+
2998+
2999+/**
3000+ *
3001+ * Reads an external resource and returns its contents as a sequence of strings,
3002+ * separated at newline boundaries.
3003+ *
3004+ * Author: Zorba Team
3005+ */
3006+class FnUnparsedTextLinesIteratorState : public PlanIteratorState
3007+{
3008+public:
3009+ std::unique_ptr<std::istream, StreamReleaser>* theStream; //the current stream
3010+ internal::StreamResource* theStreamResource; //the current iterator
3011+
3012+ FnUnparsedTextLinesIteratorState();
3013+
3014+ ~FnUnparsedTextLinesIteratorState();
3015+
3016+ void init(PlanState&);
3017+ void reset(PlanState&);
3018+};
3019+
3020+class FnUnparsedTextLinesIterator : public NaryBaseIterator<FnUnparsedTextLinesIterator, FnUnparsedTextLinesIteratorState>
3021+{
3022+public:
3023+ SERIALIZABLE_CLASS(FnUnparsedTextLinesIterator);
3024+
3025+ SERIALIZABLE_CLASS_CONSTRUCTOR2T(FnUnparsedTextLinesIterator,
3026+ NaryBaseIterator<FnUnparsedTextLinesIterator, FnUnparsedTextLinesIteratorState>);
3027+
3028+ void serialize( ::zorba::serialization::Archiver& ar)
3029+ {
3030+ serialize_baseclass(ar,
3031+ (NaryBaseIterator<FnUnparsedTextLinesIterator, FnUnparsedTextLinesIteratorState>*)this);
3032+ }
3033+
3034+ FnUnparsedTextLinesIterator(
3035+ static_context* sctx,
3036+ const QueryLoc& loc,
3037+ std::vector<PlanIter_t>& children)
3038+ :
3039+ NaryBaseIterator<FnUnparsedTextLinesIterator, FnUnparsedTextLinesIteratorState>(sctx, loc, children)
3040+ {}
3041+
3042+ virtual ~FnUnparsedTextLinesIterator();
3043+
3044+ void accept(PlanIterVisitor& v) const;
3045+
3046+ bool nextImpl(store::Item_t& result, PlanState& aPlanState) const;
3047+};
3048+
3049+
3050 }
3051 #endif
3052 /*
3053
3054=== modified file 'src/runtime/sequences/sequences_impl.cpp'
3055--- src/runtime/sequences/sequences_impl.cpp 2012-03-28 05:19:57 +0000
3056+++ src/runtime/sequences/sequences_impl.cpp 2012-04-13 09:46:19 +0000
3057@@ -30,6 +30,8 @@
3058 // For timing
3059 #include <zorba/util/time.h>
3060
3061+#include <zorba/transcode_stream.h>
3062+
3063 #include <util/fs_util.h>
3064 #include <util/uri_util.h>
3065
3066@@ -50,6 +52,7 @@
3067 #include <store/api/store.h>
3068 #include <store/api/iterator.h>
3069 #include <store/api/item_factory.h>
3070+#include "store/api/temp_seq.h"
3071 #include <store/api/pul.h>
3072 #include <store/util/hashset_node_handle.h>
3073
3074@@ -1925,5 +1928,274 @@
3075 STACK_END (state);
3076 }
3077
3078+
3079+/*******************************************************************************
3080+ 14.8.8 fn:environment-variable
3081+********************************************************************************/
3082+bool FnEnvironmentVariableIterator::nextImpl(store::Item_t& result, PlanState& planState) const
3083+{
3084+ store::Item_t item;
3085+ zstring varname;
3086+
3087+ PlanIteratorState* state;
3088+ DEFAULT_STACK_INIT(PlanIteratorState, state, planState);
3089+
3090+ consumeNext(item, theChildren[0].getp(),planState);
3091+
3092+ item->getStringValue2(varname);
3093+ result = planState.theLocalDynCtx->get_environment_variable(varname);
3094+ STACK_PUSH(result!=NULL, state);
3095+
3096+ STACK_END(state);
3097+}
3098+
3099+/*******************************************************************************
3100+ 14.8.9 fn:available-environment-variables
3101+********************************************************************************/
3102+bool FnAvailableEnvironmentVariablesIterator::nextImpl(store::Item_t& result, PlanState& planState) const
3103+{
3104+ store::Iterator_t lIte;
3105+ FnAvailableEnvironmentVariablesIteratorState* state;
3106+ DEFAULT_STACK_INIT(FnAvailableEnvironmentVariablesIteratorState, state, planState);
3107+
3108+ state->theIterator = planState.theLocalDynCtx->available_environment_variables();
3109+
3110+ state->theIterator->open();
3111+ while (state->theIterator->next(result))
3112+ {
3113+ STACK_PUSH(true, state);
3114+ }
3115+ state->theIterator->close();
3116+ STACK_END(state);
3117+}
3118+
3119+void FnAvailableEnvironmentVariablesIteratorState::init(PlanState& planState)
3120+{
3121+ PlanIteratorState::init(planState);
3122+ theIterator = 0;
3123+}
3124+
3125+void FnAvailableEnvironmentVariablesIteratorState::reset(PlanState& planState)
3126+{
3127+ PlanIteratorState::reset(planState);
3128+ theIterator = 0;
3129+}
3130+
3131+/*******************************************************************************
3132+ 14.8.5 fn:unparsed-text
3133+********************************************************************************/
3134+/**
3135+ * Utility method for fn:unparsed-text() and fn:unparsed-text-available().
3136+ */
3137+static void readDocument(
3138+ zstring const& aUri,
3139+ zstring const& aEncoding,
3140+ static_context* aSctx,
3141+ PlanState& aPlanState,
3142+ QueryLoc const& loc,
3143+ store::Item_t& oResult)
3144+{
3145+ //Normalize input to handle filesystem paths, etc.
3146+ zstring const lNormUri(normalizeInput(aUri, aSctx, loc));
3147+
3148+ //Resolve URI to stream
3149+ zstring lErrorMessage;
3150+ std::auto_ptr<internal::Resource> lResource = aSctx->resolve_uri
3151+ (lNormUri, internal::EntityData::SOME_CONTENT, lErrorMessage);
3152+
3153+ internal::StreamResource* lStreamResource =
3154+ dynamic_cast<internal::StreamResource*>(lResource.get());
3155+
3156+ if (lStreamResource == NULL)
3157+ {
3158+ throw XQUERY_EXCEPTION(err::FOUT1170, ERROR_PARAMS(aUri), ERROR_LOC(loc));
3159+ }
3160+ StreamReleaser lStreamReleaser = lStreamResource->getStreamReleaser();
3161+ std::unique_ptr<std::istream, StreamReleaser> lStream(lStreamResource->getStream(), lStreamReleaser);
3162+
3163+ lStreamResource->setStreamReleaser(nullptr);
3164+
3165+ //check if encoding is needed
3166+ if (transcode::is_necessary(aEncoding.c_str()))
3167+ {
3168+ if (!transcode::is_supported(aEncoding.c_str()))
3169+ {
3170+ throw XQUERY_EXCEPTION(err::FOUT1190, ERROR_PARAMS(aUri), ERROR_LOC(loc));
3171+ }
3172+ transcode::attach(*lStream.get(), aEncoding.c_str());
3173+ }
3174+ //creates stream item
3175+ GENV_ITEMFACTORY->createStreamableString(
3176+ oResult,
3177+ *lStream.release(),
3178+ lStream.get_deleter()
3179+ );
3180+
3181+ if (oResult.isNull())
3182+ {
3183+ throw XQUERY_EXCEPTION(err::FOUT1170, ERROR_PARAMS(aUri), ERROR_LOC(loc));
3184+ }
3185+}
3186+
3187+bool FnUnparsedTextIterator::nextImpl(store::Item_t& result, PlanState& planState) const
3188+{
3189+ store::Item_t uriItem;
3190+ store::Item_t encodingItem;
3191+ zstring uriString;
3192+ zstring encodingString("UTF-8");
3193+
3194+ PlanIteratorState* state;
3195+ DEFAULT_STACK_INIT(PlanIteratorState, state, planState);
3196+
3197+ if (!consumeNext(uriItem, theChildren[0].getp(), planState))
3198+ {
3199+ STACK_PUSH(false, state);
3200+ }
3201+
3202+ if (theChildren.size() == 2)
3203+ {
3204+ consumeNext(encodingItem, theChildren[1].getp(), planState);
3205+ encodingItem->getStringValue2(encodingString);
3206+ }
3207+
3208+ uriItem->getStringValue2(uriString);
3209+ readDocument(uriString, encodingString, theSctx, planState, loc, result);
3210+ STACK_PUSH(true, state);
3211+
3212+ STACK_END(state);
3213+}
3214+
3215+
3216+/*******************************************************************************
3217+ 14.8.7 fn:unparsed-text-available
3218+********************************************************************************/
3219+
3220+bool FnUnparsedTextAvailableIterator::nextImpl(store::Item_t& result, PlanState& planState) const
3221+{
3222+ store::Item_t unparsedText;
3223+ store::Item_t uriItem;
3224+ store::Item_t encodingItem;
3225+ zstring uriString;
3226+ zstring encodingString("UTF-8");
3227+
3228+ PlanIteratorState* state;
3229+ DEFAULT_STACK_INIT(PlanIteratorState, state, planState);
3230+
3231+ if (!consumeNext(uriItem, theChildren[0].getp(), planState))
3232+ {
3233+ STACK_PUSH(GENV_ITEMFACTORY->createBoolean(result, false), state);
3234+ }
3235+
3236+ if (theChildren.size() == 2)
3237+ {
3238+ consumeNext(encodingItem, theChildren[1].getp(), planState);
3239+ encodingItem->getStringValue2(encodingString);
3240+ }
3241+
3242+ uriItem->getStringValue2(uriString);
3243+
3244+ try
3245+ {
3246+ readDocument(uriString, encodingString, theSctx, planState, loc, unparsedText);
3247+ }
3248+ catch (XQueryException const& e)
3249+ {
3250+ unparsedText = NULL;
3251+ }
3252+
3253+ STACK_PUSH(GENV_ITEMFACTORY->createBoolean(result, !(unparsedText.isNull()) ), state);
3254+
3255+ STACK_END(state);
3256+}
3257+
3258+/*******************************************************************************
3259+ 14.8.6 fn:unparsed-text-lines
3260+********************************************************************************/
3261+FnUnparsedTextLinesIteratorState::~FnUnparsedTextLinesIteratorState()
3262+{
3263+ delete theStream;
3264+ theStream = 0;
3265+ theStreamResource = 0;
3266+}
3267+
3268+bool FnUnparsedTextLinesIterator::nextImpl(store::Item_t& result, PlanState& planState) const
3269+{
3270+ store::Item_t uriItem;
3271+ store::Item_t encodingItem;
3272+ store::Item_t streamItem;
3273+ zstring streamLine;
3274+ zstring uriString;
3275+ zstring encodingString("UTF-8");
3276+ zstring lNormUri;
3277+ zstring lErrorMessage;
3278+ std::auto_ptr<internal::Resource> lResource;
3279+ StreamReleaser lStreamReleaser;
3280+
3281+ FnUnparsedTextLinesIteratorState* state;
3282+ DEFAULT_STACK_INIT(FnUnparsedTextLinesIteratorState, state, planState);
3283+
3284+ if (!consumeNext(uriItem, theChildren[0].getp(), planState))
3285+ {
3286+ STACK_PUSH(false, state);
3287+ }
3288+
3289+ if (theChildren.size() == 2)
3290+ {
3291+ consumeNext(encodingItem, theChildren[1].getp(), planState);
3292+ encodingItem->getStringValue2(encodingString);
3293+ }
3294+
3295+ //Normalize input to handle filesystem paths, etc.
3296+ uriItem->getStringValue2(uriString);
3297+ lNormUri = normalizeInput(uriString, theSctx, loc);
3298+
3299+ //Resolve URI to stream
3300+ lResource = theSctx->resolve_uri
3301+ (lNormUri, internal::EntityData::SOME_CONTENT, lErrorMessage);
3302+
3303+ state->theStreamResource =
3304+ dynamic_cast<internal::StreamResource*>(lResource.get());
3305+
3306+ if (state->theStreamResource == NULL)
3307+ throw XQUERY_EXCEPTION(err::FOUT1170, ERROR_PARAMS(uriString), ERROR_LOC(loc));
3308+
3309+ lStreamReleaser = state->theStreamResource->getStreamReleaser();
3310+ state->theStream = new std::unique_ptr<std::istream, StreamReleaser> (state->theStreamResource->getStream(), lStreamReleaser);
3311+ state->theStreamResource->setStreamReleaser(nullptr);
3312+
3313+ //check if encoding is needed
3314+ if (transcode::is_necessary(encodingString.c_str()))
3315+ {
3316+ if (!transcode::is_supported(encodingString.c_str()))
3317+ {
3318+ throw XQUERY_EXCEPTION(err::FOUT1190, ERROR_PARAMS(uriString), ERROR_LOC(loc));
3319+ }
3320+ transcode::attach(*state->theStream->get(), encodingString.c_str());
3321+ }
3322+
3323+ while (state->theStream->get()->good())
3324+ {
3325+ getline(*state->theStream->get(), streamLine);
3326+ STACK_PUSH(GENV_ITEMFACTORY->createString(result, streamLine), state);
3327+ }
3328+
3329+ STACK_END(state);
3330+}
3331+
3332+void FnUnparsedTextLinesIteratorState::init(PlanState& planState)
3333+{
3334+ PlanIteratorState::init(planState);
3335+ theStreamResource = 0;
3336+ theStream = 0;
3337+}
3338+
3339+void FnUnparsedTextLinesIteratorState::reset(PlanState& planState)
3340+{
3341+ PlanIteratorState::reset(planState);
3342+ delete theStream;
3343+ theStream = 0;
3344+ theStreamResource = 0;
3345+}
3346+
3347 } // namespace zorba
3348 /* vim:set et sw=2 ts=2: */
3349
3350=== modified file 'src/runtime/spec/collections/collections.xml'
3351--- src/runtime/spec/collections/collections.xml 2012-03-28 05:19:57 +0000
3352+++ src/runtime/spec/collections/collections.xml 2012-04-13 09:46:19 +0000
3353@@ -1319,4 +1319,37 @@
3354 </zorba:state>
3355 </zorba:iterator>
3356
3357+<!--
3358+/*******************************************************************************
3359+14.8.5 fn:uri-collection
3360+********************************************************************************/
3361+-->
3362+ <zorba:iterator name="FnURICollectionIterator">
3363+ <zorba:description author="Zorba Team">
3364+ Returns a sequence of xs:anyURI values representing the document URIs of the
3365+ documents in a collection.
3366+ </zorba:description>
3367+
3368+ <zorba:function>
3369+
3370+ <zorba:signature localname="uri-collection" prefix="fn">
3371+ <zorba:output>xs:anyURI*</zorba:output>
3372+ </zorba:signature>
3373+
3374+ <zorba:signature localname="uri-collection" prefix="fn">
3375+ <zorba:param>xs:string?</zorba:param>
3376+ <zorba:output>xs:anyURI*</zorba:output>
3377+ </zorba:signature>
3378+
3379+ </zorba:function>
3380+
3381+ <zorba:state generateInit="false" generateReset="false" generateDestructor="false">
3382+ <zorba:member type="store::Iterator_t" name="theIterator"
3383+ brief="the current iterator"/>
3384+ <zorba:member type="bool" name="theIteratorOpened" defaultValue="false"
3385+ brief="flag indicating whether theIterator was opened"/>
3386+ </zorba:state>
3387+
3388+ </zorba:iterator>
3389+
3390 </zorba:iterators>
3391
3392=== modified file 'src/runtime/spec/sequences/sequences.xml'
3393--- src/runtime/spec/sequences/sequences.xml 2012-03-28 05:19:57 +0000
3394+++ src/runtime/spec/sequences/sequences.xml 2012-04-13 09:46:19 +0000
3395@@ -1144,4 +1144,175 @@
3396
3397 </zorba:iterator>
3398
3399-</zorba:iterators>
3400+<!--
3401+/*******************************************************************************
3402+ 14.8.9 fn:available-environment-variables
3403+********************************************************************************/
3404+-->
3405+
3406+<zorba:iterator name="FnAvailableEnvironmentVariablesIterator">
3407+ <zorba:description author="Zorba Team">
3408+ Summary: returns a list of environment variable names that are suitable for
3409+ passing to fn:environment-variable, as a (possible empty) sequence of
3410+ strings.
3411+
3412+ The function returns a sequence of strings, being the names of the environment
3413+ variables in the dynamic context in some implementation-defined order.
3414+ </zorba:description>
3415+
3416+ <zorba:function>
3417+ <zorba:signature localname="available-environment-variables" prefix="fn">
3418+ <zorba:output>xs:string*</zorba:output>
3419+ </zorba:signature>
3420+
3421+ </zorba:function>
3422+
3423+ <zorba:state generateInit="false" generateReset="false">
3424+ <zorba:member type="store::Iterator_t" name="theIterator"
3425+ brief="the current iterator"/>
3426+ </zorba:state>
3427+
3428+ <zorba:methods>
3429+ <zorba:accessesDynCtx returnValue="true"/>
3430+ </zorba:methods>
3431+
3432+</zorba:iterator>
3433+
3434+<!--
3435+/*******************************************************************************
3436+14.8.8 fn:environment-variable
3437+********************************************************************************/
3438+-->
3439+
3440+<zorba:iterator name="FnEnvironmentVariableIterator">
3441+ <zorba:description author="Zorba Team">
3442+ Summary: Returns the value of a system environment variable, if it exists.
3443+
3444+ If there is no environment variable with a matching name, the function returns
3445+ the empty sequence.
3446+ </zorba:description>
3447+
3448+ <zorba:function>
3449+ <zorba:signature localname="environment-variable" prefix="fn">
3450+ <zorba:param>xs:string</zorba:param>
3451+ <zorba:output>xs:string?</zorba:output>
3452+ </zorba:signature>
3453+ </zorba:function>
3454+
3455+ <zorba:methods>
3456+ <zorba:accessesDynCtx returnValue="true"/>
3457+ </zorba:methods>
3458+
3459+</zorba:iterator>
3460+
3461+<!--
3462+/*******************************************************************************
3463+14.8.5 fn:unparsed-text
3464+********************************************************************************/
3465+-->
3466+
3467+<zorba:iterator name="FnUnparsedTextIterator">
3468+ <zorba:description author="Zorba Team">
3469+ Summary: The fn:unparsed-text function reads an external resource (for
3470+ example, a file) and returns its contents as a string.
3471+ </zorba:description>
3472+
3473+ <zorba:function>
3474+
3475+ <zorba:signature localname="unparsed-text" prefix="fn">
3476+ <zorba:param>xs:string?</zorba:param>
3477+ <zorba:output>xs:string?</zorba:output>
3478+ </zorba:signature>
3479+
3480+ <zorba:signature localname="unparsed-text" prefix="fn">
3481+ <zorba:param>xs:string?</zorba:param>
3482+ <zorba:param>xs:string</zorba:param>
3483+ <zorba:output>xs:string?</zorba:output>
3484+ </zorba:signature>
3485+ </zorba:function>
3486+
3487+ <zorba:methods>
3488+ <zorba:accessesDynCtx returnValue="true"/>
3489+ <zorba:isSource returnValue="true"/>
3490+ </zorba:methods>
3491+
3492+</zorba:iterator>
3493+
3494+<!--
3495+/*******************************************************************************
3496+14.8.5 fn:unparsed-text
3497+********************************************************************************/
3498+-->
3499+
3500+<zorba:iterator name="FnUnparsedTextAvailableIterator">
3501+ <zorba:description author="Zorba Team">
3502+ Because errors in evaluating the fn:unparsed-text function are
3503+ non-recoverable, these two functions are provided to allow an application
3504+ to determine whether a call with particular arguments would succeed.
3505+ </zorba:description>
3506+
3507+ <zorba:function>
3508+
3509+ <zorba:signature localname="unparsed-text-available" prefix="fn">
3510+ <zorba:param>xs:string?</zorba:param>
3511+ <zorba:output>xs:string?</zorba:output>
3512+ </zorba:signature>
3513+
3514+ <zorba:signature localname="unparsed-text-available" prefix="fn">
3515+ <zorba:param>xs:string?</zorba:param>
3516+ <zorba:param>xs:string</zorba:param>
3517+ <zorba:output>xs:string?</zorba:output>
3518+ </zorba:signature>
3519+
3520+ </zorba:function>
3521+
3522+ <zorba:methods>
3523+ <zorba:accessesDynCtx returnValue="true"/>
3524+ <zorba:isSource returnValue="true"/>
3525+ </zorba:methods>
3526+
3527+</zorba:iterator>
3528+
3529+<!--
3530+/*******************************************************************************
3531+14.8.6 fn:unparsed-text-lines
3532+********************************************************************************/
3533+-->
3534+
3535+ <zorba:iterator name="FnUnparsedTextLinesIterator">
3536+ <zorba:description author="Zorba Team">
3537+ Reads an external resource and returns its contents as a sequence of strings,
3538+ separated at newline boundaries.
3539+ </zorba:description>
3540+
3541+ <zorba:function>
3542+
3543+ <zorba:signature localname="unparsed-text-lines" prefix="fn">
3544+ <zorba:param>xs:string?</zorba:param>
3545+ <zorba:output>xs:string*</zorba:output>
3546+ </zorba:signature>
3547+
3548+ <zorba:signature localname="unparsed-text-lines" prefix="fn">
3549+ <zorba:param>xs:string?</zorba:param>
3550+ <zorba:param>xs:string</zorba:param>
3551+ <zorba:output>xs:string*</zorba:output>
3552+ </zorba:signature>
3553+ </zorba:function>
3554+
3555+
3556+ <zorba:state generateInit="false" generateReset="false"
3557+ generateDestructor="false">
3558+ <zorba:member type="std::unique_ptr&lt;std::istream, StreamReleaser&gt;*" name="theStream"
3559+ brief="the current stream"/>
3560+ <zorba:member type=" internal::StreamResource*" name="theStreamResource"
3561+ brief="the current iterator"/>
3562+ </zorba:state>
3563+
3564+ <zorba:methods>
3565+ <zorba:accessesDynCtx returnValue="true"/>
3566+ <zorba:isSource returnValue="true"/>
3567+ </zorba:methods>
3568+
3569+ </zorba:iterator>
3570+
3571+</zorba:iterators>
3572\ No newline at end of file
3573
3574=== modified file 'src/runtime/visitors/pregenerated/planiter_visitor.h'
3575--- src/runtime/visitors/pregenerated/planiter_visitor.h 2012-03-28 05:19:57 +0000
3576+++ src/runtime/visitors/pregenerated/planiter_visitor.h 2012-04-13 09:46:19 +0000
3577@@ -120,6 +120,8 @@
3578
3579 class DeclaredICsIterator;
3580
3581+ class FnURICollectionIterator;
3582+
3583 class CurrentDateTimeIterator;
3584
3585 class CurrentDateIterator;
3586@@ -506,6 +508,16 @@
3587
3588 class FnDocAvailableIterator;
3589
3590+ class FnAvailableEnvironmentVariablesIterator;
3591+
3592+ class FnEnvironmentVariableIterator;
3593+
3594+ class FnUnparsedTextIterator;
3595+
3596+ class FnUnparsedTextAvailableIterator;
3597+
3598+ class FnUnparsedTextLinesIterator;
3599+
3600 class PutDocumentIterator;
3601
3602 class RemoveDocumentIterator;
3603@@ -741,6 +753,9 @@
3604 virtual void beginVisit ( const DeclaredICsIterator& ) = 0;
3605 virtual void endVisit ( const DeclaredICsIterator& ) = 0;
3606
3607+ virtual void beginVisit ( const FnURICollectionIterator& ) = 0;
3608+ virtual void endVisit ( const FnURICollectionIterator& ) = 0;
3609+
3610 virtual void beginVisit ( const CurrentDateTimeIterator& ) = 0;
3611 virtual void endVisit ( const CurrentDateTimeIterator& ) = 0;
3612
3613@@ -1319,6 +1334,21 @@
3614 virtual void beginVisit ( const FnDocAvailableIterator& ) = 0;
3615 virtual void endVisit ( const FnDocAvailableIterator& ) = 0;
3616
3617+ virtual void beginVisit ( const FnAvailableEnvironmentVariablesIterator& ) = 0;
3618+ virtual void endVisit ( const FnAvailableEnvironmentVariablesIterator& ) = 0;
3619+
3620+ virtual void beginVisit ( const FnEnvironmentVariableIterator& ) = 0;
3621+ virtual void endVisit ( const FnEnvironmentVariableIterator& ) = 0;
3622+
3623+ virtual void beginVisit ( const FnUnparsedTextIterator& ) = 0;
3624+ virtual void endVisit ( const FnUnparsedTextIterator& ) = 0;
3625+
3626+ virtual void beginVisit ( const FnUnparsedTextAvailableIterator& ) = 0;
3627+ virtual void endVisit ( const FnUnparsedTextAvailableIterator& ) = 0;
3628+
3629+ virtual void beginVisit ( const FnUnparsedTextLinesIterator& ) = 0;
3630+ virtual void endVisit ( const FnUnparsedTextLinesIterator& ) = 0;
3631+
3632 virtual void beginVisit ( const PutDocumentIterator& ) = 0;
3633 virtual void endVisit ( const PutDocumentIterator& ) = 0;
3634
3635
3636=== modified file 'src/runtime/visitors/pregenerated/printer_visitor.cpp'
3637--- src/runtime/visitors/pregenerated/printer_visitor.cpp 2012-03-28 05:19:57 +0000
3638+++ src/runtime/visitors/pregenerated/printer_visitor.cpp 2012-04-13 09:46:19 +0000
3639@@ -741,6 +741,20 @@
3640 // </DeclaredICsIterator>
3641
3642
3643+// <FnURICollectionIterator>
3644+void PrinterVisitor::beginVisit ( const FnURICollectionIterator& a) {
3645+ thePrinter.startBeginVisit("FnURICollectionIterator", ++theId);
3646+ printCommons( &a, theId );
3647+ thePrinter.endBeginVisit( theId );
3648+}
3649+
3650+void PrinterVisitor::endVisit ( const FnURICollectionIterator& ) {
3651+ thePrinter.startEndVisit();
3652+ thePrinter.endEndVisit();
3653+}
3654+// </FnURICollectionIterator>
3655+
3656+
3657 // <CurrentDateTimeIterator>
3658 void PrinterVisitor::beginVisit ( const CurrentDateTimeIterator& a) {
3659 thePrinter.startBeginVisit("CurrentDateTimeIterator", ++theId);
3660@@ -3431,6 +3445,76 @@
3661 // </FnDocAvailableIterator>
3662
3663
3664+// <FnAvailableEnvironmentVariablesIterator>
3665+void PrinterVisitor::beginVisit ( const FnAvailableEnvironmentVariablesIterator& a) {
3666+ thePrinter.startBeginVisit("FnAvailableEnvironmentVariablesIterator", ++theId);
3667+ printCommons( &a, theId );
3668+ thePrinter.endBeginVisit( theId );
3669+}
3670+
3671+void PrinterVisitor::endVisit ( const FnAvailableEnvironmentVariablesIterator& ) {
3672+ thePrinter.startEndVisit();
3673+ thePrinter.endEndVisit();
3674+}
3675+// </FnAvailableEnvironmentVariablesIterator>
3676+
3677+
3678+// <FnEnvironmentVariableIterator>
3679+void PrinterVisitor::beginVisit ( const FnEnvironmentVariableIterator& a) {
3680+ thePrinter.startBeginVisit("FnEnvironmentVariableIterator", ++theId);
3681+ printCommons( &a, theId );
3682+ thePrinter.endBeginVisit( theId );
3683+}
3684+
3685+void PrinterVisitor::endVisit ( const FnEnvironmentVariableIterator& ) {
3686+ thePrinter.startEndVisit();
3687+ thePrinter.endEndVisit();
3688+}
3689+// </FnEnvironmentVariableIterator>
3690+
3691+
3692+// <FnUnparsedTextIterator>
3693+void PrinterVisitor::beginVisit ( const FnUnparsedTextIterator& a) {
3694+ thePrinter.startBeginVisit("FnUnparsedTextIterator", ++theId);
3695+ printCommons( &a, theId );
3696+ thePrinter.endBeginVisit( theId );
3697+}
3698+
3699+void PrinterVisitor::endVisit ( const FnUnparsedTextIterator& ) {
3700+ thePrinter.startEndVisit();
3701+ thePrinter.endEndVisit();
3702+}
3703+// </FnUnparsedTextIterator>
3704+
3705+
3706+// <FnUnparsedTextAvailableIterator>
3707+void PrinterVisitor::beginVisit ( const FnUnparsedTextAvailableIterator& a) {
3708+ thePrinter.startBeginVisit("FnUnparsedTextAvailableIterator", ++theId);
3709+ printCommons( &a, theId );
3710+ thePrinter.endBeginVisit( theId );
3711+}
3712+
3713+void PrinterVisitor::endVisit ( const FnUnparsedTextAvailableIterator& ) {
3714+ thePrinter.startEndVisit();
3715+ thePrinter.endEndVisit();
3716+}
3717+// </FnUnparsedTextAvailableIterator>
3718+
3719+
3720+// <FnUnparsedTextLinesIterator>
3721+void PrinterVisitor::beginVisit ( const FnUnparsedTextLinesIterator& a) {
3722+ thePrinter.startBeginVisit("FnUnparsedTextLinesIterator", ++theId);
3723+ printCommons( &a, theId );
3724+ thePrinter.endBeginVisit( theId );
3725+}
3726+
3727+void PrinterVisitor::endVisit ( const FnUnparsedTextLinesIterator& ) {
3728+ thePrinter.startEndVisit();
3729+ thePrinter.endEndVisit();
3730+}
3731+// </FnUnparsedTextLinesIterator>
3732+
3733+
3734 // <PutDocumentIterator>
3735 void PrinterVisitor::beginVisit ( const PutDocumentIterator& a) {
3736 thePrinter.startBeginVisit("PutDocumentIterator", ++theId);
3737
3738=== modified file 'src/runtime/visitors/pregenerated/printer_visitor.h'
3739--- src/runtime/visitors/pregenerated/printer_visitor.h 2012-03-28 05:19:57 +0000
3740+++ src/runtime/visitors/pregenerated/printer_visitor.h 2012-04-13 09:46:19 +0000
3741@@ -182,6 +182,9 @@
3742 void beginVisit( const DeclaredICsIterator& );
3743 void endVisit ( const DeclaredICsIterator& );
3744
3745+ void beginVisit( const FnURICollectionIterator& );
3746+ void endVisit ( const FnURICollectionIterator& );
3747+
3748 void beginVisit( const CurrentDateTimeIterator& );
3749 void endVisit ( const CurrentDateTimeIterator& );
3750
3751@@ -762,6 +765,21 @@
3752 void beginVisit( const FnDocAvailableIterator& );
3753 void endVisit ( const FnDocAvailableIterator& );
3754
3755+ void beginVisit( const FnAvailableEnvironmentVariablesIterator& );
3756+ void endVisit ( const FnAvailableEnvironmentVariablesIterator& );
3757+
3758+ void beginVisit( const FnEnvironmentVariableIterator& );
3759+ void endVisit ( const FnEnvironmentVariableIterator& );
3760+
3761+ void beginVisit( const FnUnparsedTextIterator& );
3762+ void endVisit ( const FnUnparsedTextIterator& );
3763+
3764+ void beginVisit( const FnUnparsedTextAvailableIterator& );
3765+ void endVisit ( const FnUnparsedTextAvailableIterator& );
3766+
3767+ void beginVisit( const FnUnparsedTextLinesIterator& );
3768+ void endVisit ( const FnUnparsedTextLinesIterator& );
3769+
3770 void beginVisit( const PutDocumentIterator& );
3771 void endVisit ( const PutDocumentIterator& );
3772
3773
3774=== added file 'test/rbkt/ExpQueryResults/zorba/collections/uri-collection_1.xml.res'
3775--- test/rbkt/ExpQueryResults/zorba/collections/uri-collection_1.xml.res 1970-01-01 00:00:00 +0000
3776+++ test/rbkt/ExpQueryResults/zorba/collections/uri-collection_1.xml.res 2012-04-13 09:46:19 +0000
3777@@ -0,0 +1,1 @@
3778+true
3779\ No newline at end of file
3780
3781=== added file 'test/rbkt/ExpQueryResults/zorba/sequences/available-environment-variables.xml.res'
3782--- test/rbkt/ExpQueryResults/zorba/sequences/available-environment-variables.xml.res 1970-01-01 00:00:00 +0000
3783+++ test/rbkt/ExpQueryResults/zorba/sequences/available-environment-variables.xml.res 2012-04-13 09:46:19 +0000
3784@@ -0,0 +1,1 @@
3785+true
3786\ No newline at end of file
3787
3788=== added file 'test/rbkt/ExpQueryResults/zorba/sequences/environment-variable_1.xml.res'
3789--- test/rbkt/ExpQueryResults/zorba/sequences/environment-variable_1.xml.res 1970-01-01 00:00:00 +0000
3790+++ test/rbkt/ExpQueryResults/zorba/sequences/environment-variable_1.xml.res 2012-04-13 09:46:19 +0000
3791@@ -0,0 +1,1 @@
3792+true
3793\ No newline at end of file
3794
3795=== added file 'test/rbkt/ExpQueryResults/zorba/sequences/environment-variable_2.xml.res'
3796--- test/rbkt/ExpQueryResults/zorba/sequences/environment-variable_2.xml.res 1970-01-01 00:00:00 +0000
3797+++ test/rbkt/ExpQueryResults/zorba/sequences/environment-variable_2.xml.res 2012-04-13 09:46:19 +0000
3798@@ -0,0 +1,1 @@
3799+true
3800\ No newline at end of file
3801
3802=== added file 'test/rbkt/ExpQueryResults/zorba/sequences/unparsed-text-available.xml.res'
3803--- test/rbkt/ExpQueryResults/zorba/sequences/unparsed-text-available.xml.res 1970-01-01 00:00:00 +0000
3804+++ test/rbkt/ExpQueryResults/zorba/sequences/unparsed-text-available.xml.res 2012-04-13 09:46:19 +0000
3805@@ -0,0 +1,1 @@
3806+true
3807\ No newline at end of file
3808
3809=== added file 'test/rbkt/ExpQueryResults/zorba/sequences/unparsed-text-lines_1.xml.res'
3810--- test/rbkt/ExpQueryResults/zorba/sequences/unparsed-text-lines_1.xml.res 1970-01-01 00:00:00 +0000
3811+++ test/rbkt/ExpQueryResults/zorba/sequences/unparsed-text-lines_1.xml.res 2012-04-13 09:46:19 +0000
3812@@ -0,0 +1,1 @@
3813+&lt;foo&gt;
3814\ No newline at end of file
3815
3816=== added file 'test/rbkt/ExpQueryResults/zorba/sequences/unparsed-text-lines_2.xml.res'
3817--- test/rbkt/ExpQueryResults/zorba/sequences/unparsed-text-lines_2.xml.res 1970-01-01 00:00:00 +0000
3818+++ test/rbkt/ExpQueryResults/zorba/sequences/unparsed-text-lines_2.xml.res 2012-04-13 09:46:19 +0000
3819@@ -0,0 +1,1 @@
3820+&lt;foo&gt;
3821\ No newline at end of file
3822
3823=== added file 'test/rbkt/ExpQueryResults/zorba/sequences/unparsed-text_1.xml.res'
3824--- test/rbkt/ExpQueryResults/zorba/sequences/unparsed-text_1.xml.res 1970-01-01 00:00:00 +0000
3825+++ test/rbkt/ExpQueryResults/zorba/sequences/unparsed-text_1.xml.res 2012-04-13 09:46:19 +0000
3826@@ -0,0 +1,3 @@
3827+&lt;foo&gt;
3828+ &lt;?blub?&gt;
3829+&lt;/foo&gt;
3830\ No newline at end of file
3831
3832=== added file 'test/rbkt/ExpQueryResults/zorba/sequences/unparsed-text_2.xml.res'
3833--- test/rbkt/ExpQueryResults/zorba/sequences/unparsed-text_2.xml.res 1970-01-01 00:00:00 +0000
3834+++ test/rbkt/ExpQueryResults/zorba/sequences/unparsed-text_2.xml.res 2012-04-13 09:46:19 +0000
3835@@ -0,0 +1,3 @@
3836+&lt;foo&gt;
3837+ &lt;?blub?&gt;
3838+&lt;/foo&gt;
3839\ No newline at end of file
3840
3841=== added file 'test/rbkt/Queries/zorba/collections/uri-collection.xml'
3842--- test/rbkt/Queries/zorba/collections/uri-collection.xml 1970-01-01 00:00:00 +0000
3843+++ test/rbkt/Queries/zorba/collections/uri-collection.xml 2012-04-13 09:46:19 +0000
3844@@ -0,0 +1,6 @@
3845+<BookList>
3846+ <Book>
3847+ <Name>Zorba the greek</Name>
3848+ <Author>Nikos Kazahtzakis</Author>
3849+ </Book>
3850+</BookList>
3851\ No newline at end of file
3852
3853=== added file 'test/rbkt/Queries/zorba/collections/uri-collection_1.xq'
3854--- test/rbkt/Queries/zorba/collections/uri-collection_1.xq 1970-01-01 00:00:00 +0000
3855+++ test/rbkt/Queries/zorba/collections/uri-collection_1.xq 2012-04-13 09:46:19 +0000
3856@@ -0,0 +1,16 @@
3857+import module namespace ddl =
3858+ "http://www.zorba-xquery.com/modules/store/dynamic/collections/w3c/ddl";
3859+import module namespace dml =
3860+ "http://www.zorba-xquery.com/modules/store/dynamic/collections/w3c/dml";
3861+
3862+
3863+declare variable $coll := "http://www.zorba-xquery.com/collection";
3864+declare variable $doc := doc("uri-collection.xml");
3865+ddl:create($coll);
3866+
3867+dml:apply-insert-nodes-first($coll, $doc);
3868+
3869+let $uricoll := uri-collection($coll)
3870+return if( string($uricoll) != "" )
3871+ then true()
3872+ else false()
3873\ No newline at end of file
3874
3875=== added file 'test/rbkt/Queries/zorba/collections/uri-collection_2.spec'
3876--- test/rbkt/Queries/zorba/collections/uri-collection_2.spec 1970-01-01 00:00:00 +0000
3877+++ test/rbkt/Queries/zorba/collections/uri-collection_2.spec 2012-04-13 09:46:19 +0000
3878@@ -0,0 +1,1 @@
3879+Error: http://www.w3.org/2005/xqt-errors:FODC0002
3880\ No newline at end of file
3881
3882=== added file 'test/rbkt/Queries/zorba/collections/uri-collection_2.xq'
3883--- test/rbkt/Queries/zorba/collections/uri-collection_2.xq 1970-01-01 00:00:00 +0000
3884+++ test/rbkt/Queries/zorba/collections/uri-collection_2.xq 2012-04-13 09:46:19 +0000
3885@@ -0,0 +1,16 @@
3886+import module namespace ddl =
3887+ "http://www.zorba-xquery.com/modules/store/dynamic/collections/w3c/ddl";
3888+import module namespace dml =
3889+ "http://www.zorba-xquery.com/modules/store/dynamic/collections/w3c/dml";
3890+
3891+
3892+declare variable $coll := "http://www.zorba-xquery.com/collection";
3893+declare variable $doc := doc("uri-collection.xml");
3894+ddl:create($coll);
3895+
3896+dml:apply-insert-nodes-first($coll, $doc);
3897+
3898+let $uricoll := uri-collection("")
3899+return if( string($uricoll) != "" )
3900+ then true()
3901+ else false()
3902\ No newline at end of file
3903
3904=== added file 'test/rbkt/Queries/zorba/sequences/available-environment-variables.xq'
3905--- test/rbkt/Queries/zorba/sequences/available-environment-variables.xq 1970-01-01 00:00:00 +0000
3906+++ test/rbkt/Queries/zorba/sequences/available-environment-variables.xq 2012-04-13 09:46:19 +0000
3907@@ -0,0 +1,3 @@
3908+if (fn:available-environment-variables() != "")
3909+then true()
3910+else false()
3911\ No newline at end of file
3912
3913=== added file 'test/rbkt/Queries/zorba/sequences/environment-variable_1.xq'
3914--- test/rbkt/Queries/zorba/sequences/environment-variable_1.xq 1970-01-01 00:00:00 +0000
3915+++ test/rbkt/Queries/zorba/sequences/environment-variable_1.xq 2012-04-13 09:46:19 +0000
3916@@ -0,0 +1,4 @@
3917+let $a :=
3918+ for $var in fn:available-environment-variables()
3919+ return fn:environment-variable($var)
3920+return exists($a)
3921\ No newline at end of file
3922
3923=== added file 'test/rbkt/Queries/zorba/sequences/environment-variable_2.xq'
3924--- test/rbkt/Queries/zorba/sequences/environment-variable_2.xq 1970-01-01 00:00:00 +0000
3925+++ test/rbkt/Queries/zorba/sequences/environment-variable_2.xq 2012-04-13 09:46:19 +0000
3926@@ -0,0 +1,2 @@
3927+let $a := fn:environment-variable("")
3928+return empty($a)
3929\ No newline at end of file
3930
3931=== added file 'test/rbkt/Queries/zorba/sequences/unparsed-text-available.xq'
3932--- test/rbkt/Queries/zorba/sequences/unparsed-text-available.xq 1970-01-01 00:00:00 +0000
3933+++ test/rbkt/Queries/zorba/sequences/unparsed-text-available.xq 2012-04-13 09:46:19 +0000
3934@@ -0,0 +1,1 @@
3935+fn:unparsed-text-available("pi.xml", "ISO-8859-1")
3936\ No newline at end of file
3937
3938=== added file 'test/rbkt/Queries/zorba/sequences/unparsed-text-lines_1.xq'
3939--- test/rbkt/Queries/zorba/sequences/unparsed-text-lines_1.xq 1970-01-01 00:00:00 +0000
3940+++ test/rbkt/Queries/zorba/sequences/unparsed-text-lines_1.xq 2012-04-13 09:46:19 +0000
3941@@ -0,0 +1,1 @@
3942+unparsed-text-lines("pi.xml")[1]
3943\ No newline at end of file
3944
3945=== added file 'test/rbkt/Queries/zorba/sequences/unparsed-text-lines_2.xq'
3946--- test/rbkt/Queries/zorba/sequences/unparsed-text-lines_2.xq 1970-01-01 00:00:00 +0000
3947+++ test/rbkt/Queries/zorba/sequences/unparsed-text-lines_2.xq 2012-04-13 09:46:19 +0000
3948@@ -0,0 +1,1 @@
3949+unparsed-text-lines("pi.xml", "ISO-8859-1")[1]
3950\ No newline at end of file
3951
3952=== added file 'test/rbkt/Queries/zorba/sequences/unparsed-text-lines_3.spec'
3953--- test/rbkt/Queries/zorba/sequences/unparsed-text-lines_3.spec 1970-01-01 00:00:00 +0000
3954+++ test/rbkt/Queries/zorba/sequences/unparsed-text-lines_3.spec 2012-04-13 09:46:19 +0000
3955@@ -0,0 +1,1 @@
3956+Error: http://www.w3.org/2005/xqt-errors:FOUT1190
3957\ No newline at end of file
3958
3959=== added file 'test/rbkt/Queries/zorba/sequences/unparsed-text-lines_3.xq'
3960--- test/rbkt/Queries/zorba/sequences/unparsed-text-lines_3.xq 1970-01-01 00:00:00 +0000
3961+++ test/rbkt/Queries/zorba/sequences/unparsed-text-lines_3.xq 2012-04-13 09:46:19 +0000
3962@@ -0,0 +1,1 @@
3963+fn:unparsed-text-lines("pi.xml", "encoding")
3964\ No newline at end of file
3965
3966=== added file 'test/rbkt/Queries/zorba/sequences/unparsed-text-lines_4.spec'
3967--- test/rbkt/Queries/zorba/sequences/unparsed-text-lines_4.spec 1970-01-01 00:00:00 +0000
3968+++ test/rbkt/Queries/zorba/sequences/unparsed-text-lines_4.spec 2012-04-13 09:46:19 +0000
3969@@ -0,0 +1,1 @@
3970+Error: http://www.w3.org/2005/xqt-errors:FOUT1170
3971\ No newline at end of file
3972
3973=== added file 'test/rbkt/Queries/zorba/sequences/unparsed-text-lines_4.xq'
3974--- test/rbkt/Queries/zorba/sequences/unparsed-text-lines_4.xq 1970-01-01 00:00:00 +0000
3975+++ test/rbkt/Queries/zorba/sequences/unparsed-text-lines_4.xq 2012-04-13 09:46:19 +0000
3976@@ -0,0 +1,1 @@
3977+fn:unparsed-text-lines("foo.xml")
3978\ No newline at end of file
3979
3980=== added file 'test/rbkt/Queries/zorba/sequences/unparsed-text_1.xq'
3981--- test/rbkt/Queries/zorba/sequences/unparsed-text_1.xq 1970-01-01 00:00:00 +0000
3982+++ test/rbkt/Queries/zorba/sequences/unparsed-text_1.xq 2012-04-13 09:46:19 +0000
3983@@ -0,0 +1,1 @@
3984+fn:unparsed-text("pi.xml")
3985\ No newline at end of file
3986
3987=== added file 'test/rbkt/Queries/zorba/sequences/unparsed-text_2.xq'
3988--- test/rbkt/Queries/zorba/sequences/unparsed-text_2.xq 1970-01-01 00:00:00 +0000
3989+++ test/rbkt/Queries/zorba/sequences/unparsed-text_2.xq 2012-04-13 09:46:19 +0000
3990@@ -0,0 +1,1 @@
3991+fn:unparsed-text("pi.xml", "ISO-8859-1")
3992\ No newline at end of file
3993
3994=== added file 'test/rbkt/Queries/zorba/sequences/unparsed-text_3.spec'
3995--- test/rbkt/Queries/zorba/sequences/unparsed-text_3.spec 1970-01-01 00:00:00 +0000
3996+++ test/rbkt/Queries/zorba/sequences/unparsed-text_3.spec 2012-04-13 09:46:19 +0000
3997@@ -0,0 +1,1 @@
3998+Error: http://www.w3.org/2005/xqt-errors:FOUT1190
3999\ No newline at end of file
4000
4001=== added file 'test/rbkt/Queries/zorba/sequences/unparsed-text_3.xq'
4002--- test/rbkt/Queries/zorba/sequences/unparsed-text_3.xq 1970-01-01 00:00:00 +0000
4003+++ test/rbkt/Queries/zorba/sequences/unparsed-text_3.xq 2012-04-13 09:46:19 +0000
4004@@ -0,0 +1,1 @@
4005+fn:unparsed-text("pi.xml", "encoding")
4006\ No newline at end of file
4007
4008=== added file 'test/rbkt/Queries/zorba/sequences/unparsed-text_4.spec'
4009--- test/rbkt/Queries/zorba/sequences/unparsed-text_4.spec 1970-01-01 00:00:00 +0000
4010+++ test/rbkt/Queries/zorba/sequences/unparsed-text_4.spec 2012-04-13 09:46:19 +0000
4011@@ -0,0 +1,1 @@
4012+Error: http://www.w3.org/2005/xqt-errors:FOUT1170
4013\ No newline at end of file
4014
4015=== added file 'test/rbkt/Queries/zorba/sequences/unparsed-text_4.xq'
4016--- test/rbkt/Queries/zorba/sequences/unparsed-text_4.xq 1970-01-01 00:00:00 +0000
4017+++ test/rbkt/Queries/zorba/sequences/unparsed-text_4.xq 2012-04-13 09:46:19 +0000
4018@@ -0,0 +1,1 @@
4019+fn:unparsed-text("foo.xml")
4020\ No newline at end of file

Subscribers

People subscribed via source and target branches