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

Proposed by Matthias Brantner on 2012-04-13
Status: Merged
Approved by: Sorin Marian Nasoi on 2012-04-18
Approved revision: 10636
Merged at revision: 10774
Proposed branch: lp:~zorba-coders/zorba/fn_envvars
Merge into: lp:zorba
Diff against target: 4026 lines (+1944/-745)
58 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 (+171/-0)
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/introspection/introsp-fn-7.xml.res (+1/-1)
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 2012-04-13 Approve on 2012-04-18
Matthias Brantner Approve on 2012-04-13
Review via email: mp+101882@code.launchpad.net

This proposal supersedes 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.
Chris Hillery (ceejatec) wrote : Posted in a previous version of this proposal

Why did you delete NOTICE.txt?

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

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
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()

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
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?

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.

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?

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.

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

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.

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.

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
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?

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.

Juan Zacarias (juan457) wrote : Posted in a previous version of this proposal

Errors are Fixed

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
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.)

Juan Zacarias (juan457) wrote : Posted in a previous version of this proposal

all changes done

review: Approve
Zorba Build Bot (zorba-buildbot) wrote :

The attempt to merge lp:~zorba-coders/zorba/fn_envvars into lp:zorba failed. Below is the output from the failed tests.

CMake Error at /home/ceej/zo/testing/zorbatest/tester/TarmacLander.cmake:274 (message):
  Validation queue job fn_envvars-2012-04-13T10-25-07.592Z is finished. The
  final status was:

  4 tests did not succeed - changes not commited.

Error in read script: /home/ceej/zo/testing/zorbatest/tester/TarmacLander.cmake

Zorba Build Bot (zorba-buildbot) wrote :

Validation queue job fn_envvars-2012-04-16T17-29-09.092Z is finished. The final status was:

All tests succeeded!

Zorba Build Bot (zorba-buildbot) wrote :

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

review: Approve
Zorba Build Bot (zorba-buildbot) wrote :

Validation queue job fn_envvars-2012-04-18T10-58-20.547Z is finished. The final status was:

All tests succeeded!

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'ChangeLog'
--- ChangeLog 2012-04-13 11:34:54 +0000
+++ ChangeLog 2012-04-13 23:36:23 +0000
@@ -3,6 +3,11 @@
3version 2.53version 2.5
44
5New Features:5New Features:
6 * fn:available-environment-variables
7 * fn:environment-variables
8 * fn:uri-collection
9 * fn:unparsed-text
10 * fn:unparsed-text-available
6 * Extended API for Python, Java, PHP and Ruby.11 * Extended API for Python, Java, PHP and Ruby.
712
8Optimization:13Optimization:
914
=== added file 'NOTICE.txt'
--- NOTICE.txt 1970-01-01 00:00:00 +0000
+++ NOTICE.txt 2012-04-13 23:36:23 +0000
@@ -0,0 +1,740 @@
1-----------
2Zorba 2.2.0
3-----------
4
5(Note: This file is generated automatically from NOTICE.xml.
6Please do not modify this file directly.)
7
8
9
10
11Apache 2
12
13 Copyright 2006-2011 The FLWOR Foundation
14
15 See LICENSE.txt for license information.
16
17 ------------------------
18 This product includes software developed at
19 The FLWOR Foundation (http://www.flworfound.org/).
20
21 ------------------------
22 Portions of this software were developed at the Systems
23 Group of the ETH Zurich, Switzerland.
24
25
26Other files used by this project:
27----------------------------------------------------
28
29src/zorbatypes/m_apm.h
30src/zorbatypes/mapm/
31
32Copyright: 1999-2007 Michael C. Ring
33Website: http://www.tc.umn.edu/~ringx004/mapm-main.html
34
35 This software is Freeware.
36
37 Permission to use, copy, and distribute this software and its
38 documentation for any purpose with or without fee is hereby granted,
39 provided that the above copyright notice appear in all copies and
40 that both that copyright notice and this permission notice appear
41 in supporting documentation.
42
43 Permission to modify the software is granted. Permission to distribute
44 the modified code is granted. Modifications are to be distributed by
45 using the file 'license.txt' as a template to modify the file header.
46 'license.txt' is available in the official MAPM distribution.
47
48 To distribute modified source code, insert the file 'license.txt'
49 at the top of all modified source code files and edit accordingly.
50
51 This software is provided "as is" without express or implied warranty.
52
53----------------------------------------------------
54
55src/zorbamisc/config/stdint.h
56
57Copyright: 2006 Alexander Chemeris
58
59
60 Redistribution and use in source and binary forms, with or without
61 modification, are permitted provided that the following conditions are met:
62
63 1. Redistributions of source code must retain the above copyright notice,
64 this list of conditions and the following disclaimer.
65
66 2. Redistributions in binary form must reproduce the above copyright
67 notice, this list of conditions and the following disclaimer in the
68 documentation and/or other materials provided with the distribution.
69
70 3. The name of the author may be used to endorse or promote products
71 derived from this software without specific prior written permission.
72
73 THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
74 WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
75 MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
76 EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
77 SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
78 PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
79 OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
80 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
81 OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
82 ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
83
84----------------------------------------------------
85
86src/zorbautils/stemmer/
87
88Copyright: 2001 Dr. Martin Porter
89
90
91 All the software given out on this Snowball site is covered by the BSD
92 License (see http://www.opensource.org/licenses/bsd-license.html), with
93 Copyright (c) 2001, Dr Martin Porter, and (for the Java developments)
94 Copyright (c) 2002, Richard Boulton.
95
96 Essentially, all this means is that you can do what you like with the code,
97 except claim another Copyright for it, or claim that it is issued under a
98 different license. The software is also issued without warranties, which
99 means that if anyone suffers through its use, they cannot come back and sue
100 you. You also have to alert anyone to whom you give the Snowball software to
101 the fact that it is covered by the BSD license.
102
103 We have not bothered to insert the licensing arrangement into the text of
104 the Snowball software.
105
106----------------------------------------------------
107
108src/util/less.h
109
110Copyright: 1998 Paul J. Lucas
111
112
113 Redistribution and use in source and binary forms, with or without
114 modification, are permitted provided that the following conditions are met:
115
116 o Redistributions of source code must retain the above copyright notice,
117 this list of conditions and the following disclaimer.
118
119 o Redistributions in binary form must reproduce the above copyright
120 notice, this list of conditions and the following disclaimer in the
121 documentation and/or other materials provided with the distribution.
122
123 o The name of the author may not be used to endorse or promote products
124 derived from this software without specific prior written permission.
125
126 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
127 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
128 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
129 ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
130 LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
131 CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
132 SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
133 INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
134 CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
135 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
136 POSSIBILITY OF SUCH DAMAGE.
137
138----------------------------------------------------
139
140src/util/auto_vector.h (has been modified)
141
142Copyright: 2003 Reliable Software
143
144
145 Redistribution and use in source and binary forms, with or without
146 modification, are permitted provided that the following conditions are met:
147
148 o Redistributions of source code must retain the above copyright notice,
149 this list of conditions and the following disclaimer.
150
151 o Redistributions in binary form must reproduce the above copyright
152 notice, this list of conditions and the following disclaimer in the
153 documentation and/or other materials provided with the distribution.
154
155 o The name of the author may not be used to endorse or promote products
156 derived from this software without specific prior written permission.
157
158 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
159 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
160 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
161 ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
162 LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
163 CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
164 SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
165 INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
166 CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
167 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
168 POSSIBILITY OF SUCH DAMAGE.
169
170----------------------------------------------------
171
172cmake_modules/FindBoost.cmake
173
174Copyright:
175 2006-2008 Andreas Schneider <mail@cynapses.org>
176 2007 Wengo
177 2007 Mike Jackson
178 2008 Andreas Pakulat <apaku@gmx.de>
179
180
181
182 Redistribution AND use is allowed according to the terms of the New BSD license.
183 For details see the accompanying COPYING-CMAKE-SCRIPTS file.
184
185----------------------------------------------------
186
187cmake_modules/FindJNI.cmake
188cmake_modules/FindPythonLibs.cmake
189cmake_modules/FindSWIG.cmake
190
191Copyright: 2001-2009 Kitware, Inc.
192
193
194 Distributed under the OSI-approved BSD License (the "License");
195 see accompanying file Copyright.txt for details.
196
197 This software is distributed WITHOUT ANY WARRANTY; without even the
198 implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
199 See the License for more information.
200
201 CMake - Cross Platform Makefile Generator
202 Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
203 All rights reserved.
204
205 Redistribution and use in source and binary forms, with or without
206 modification, are permitted provided that the following conditions
207 are met:
208
209 * Redistributions of source code must retain the above copyright
210 notice, this list of conditions and the following disclaimer.
211
212 * Redistributions in binary form must reproduce the above copyright
213 notice, this list of conditions and the following disclaimer in the
214 documentation and/or other materials provided with the distribution.
215
216 * Neither the names of Kitware, Inc., the Insight Software Consortium,
217 nor the names of their contributors may be used to endorse or promote
218 products derived from this software without specific prior written
219 permission.
220
221 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
222 "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
223 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
224 A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
225 HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
226 SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
227 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
228 DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
229 THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
230 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
231 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
232
233 ------------------------------------------------------------------------------
234
235 The above copyright and license notice applies to distributions of
236 CMake in source and binary form. Some source files contain additional
237 notices of original copyright by their contributors; see each source
238 for details. Third-party software packages supplied with CMake under
239 compatible licenses provide their own copyright notices documented in
240 corresponding subdirectories.
241
242 ------------------------------------------------------------------------------
243
244 CMake was initially developed by Kitware with the following sponsorship:
245
246 * National Library of Medicine at the National Institutes of Health
247 as part of the Insight Segmentation and Registration Toolkit (ITK).
248
249 * US National Labs (Los Alamos, Livermore, Sandia) ASC Parallel
250 Visualization Initiative.
251
252 * National Alliance for Medical Image Computing (NAMIC) is funded by the
253 National Institutes of Health through the NIH Roadmap for Medical Research,
254 Grant U54 EB005149.
255
256 * Kitware, Inc.
257
258----------------------------------------------------
259
260/xml.xsd
261
262Copyright: 2001 World Wide Web Consortium, (Massachusetts Institute of Technology, European Research Consortium for Informatics and Mathematics, Keio University)
263
264
265 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.
266
267 W3C Software Notice and License
268
269 This work (and included software, documentation such as READMEs, or other related items) is being provided by the copyright holders under the following license.
270
271 License
272
273 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.
274
275 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:
276 •The full text of this NOTICE in a location viewable to users of the redistributed or derivative work.
277 •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.
278 •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.)
279
280 Disclaimers
281
282 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.
283
284 COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR DOCUMENTATION.
285
286 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.
287
288----------------------------------------------------
289
290schemas/xslt-xquery-serialization.xsd
291
292Copyright: 2010 World Wide Web Consortium, (Massachusetts Institute of Technology, European Research Consortium for Informatics and Mathematics, Keio University)
293
294
295 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.
296
297 W3C Software Notice and License
298
299 This work (and included software, documentation such as READMEs, or other related items) is being provided by the copyright holders under the following license.
300
301 License
302
303 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.
304
305 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:
306 •The full text of this NOTICE in a location viewable to users of the redistributed or derivative work.
307 •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.
308 •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.)
309
310 Disclaimers
311
312 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.
313
314 COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR DOCUMENTATION.
315
316 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.
317
318----------------------------------------------------
319
320modules/w3c/xpath-functions.xsd
321
322Copyright: 2005 World Wide Web Consortium, (Massachusetts Institute of Technology, European Research Consortium for Informatics and Mathematics, Keio University)
323
324
325 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.
326
327 W3C Software Notice and License
328
329 This work (and included software, documentation such as READMEs, or other related items) is being provided by the copyright holders under the following license.
330
331 License
332
333 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.
334
335 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:
336 •The full text of this NOTICE in a location viewable to users of the redistributed or derivative work.
337 •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.
338 •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.)
339
340 Disclaimers
341
342 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.
343
344 COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR DOCUMENTATION.
345
346 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.
347
348----------------------------------------------------
349
350include/xqc.h
351
352Copyright: 2008, Matthias Brantner, John Snelson
353
354
355 * All rights reserved.
356 *
357 * Redistribution and use in source and binary forms, with or without
358 * modification, are permitted provided that the following conditions are met:
359 *
360 * * Redistributions of source code must retain the above copyright notice,
361 * this list of conditions and the following disclaimer.
362 * * Redistributions in binary form must reproduce the above copyright
363 * notice, this list of conditions and the following disclaimer in the
364 * documentation and/or other materials provided with the distribution.
365 * * Neither the name of the developers nor the names of contributors may be
366 * used to endorse or promote products derived from this software without
367 * specific prior written permission.
368 *
369 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
370 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
371 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
372 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
373 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
374 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
375 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
376 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
377 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
378 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
379 * POSSIBILITY OF SUCH DAMAGE.
380
381----------------------------------------------------
382
383modules/functx/functx.xq
384
385Copyright: 2007 Datypic
386
387
388 : This library is free software; you can redistribute it and/or
389 : modify it under the terms of the GNU Lesser General Public
390 : License as published by the Free Software Foundation; either
391 : version 2.1 of the License.
392
393 : This library is distributed in the hope that it will be useful,
394 : but WITHOUT ANY WARRANTY; without even the implied warranty of
395 : MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
396 : Lesser General Public License for more details.
397
398 : You should have received a copy of the GNU Lesser General Public
399 : License along with this library; if not, write to the Free Software
400 : Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
401
402----------------------------------------------------
403
404src/compiler/parser/FlexLexer.h
405
406Copyright: 1993 The Regents of the University of California
407
408
409 // All rights reserved.
410 //
411 // This code is derived from software contributed to Berkeley by
412 // Kent Williams and Tom Epperly.
413 //
414 // Redistribution and use in source and binary forms, with or without
415 // modification, are permitted provided that the following conditions
416 // are met:
417
418 // 1. Redistributions of source code must retain the above copyright
419 // notice, this list of conditions and the following disclaimer.
420 // 2. Redistributions in binary form must reproduce the above copyright
421 // notice, this list of conditions and the following disclaimer in the
422 // documentation and/or other materials provided with the distribution.
423
424 // Neither the name of the University nor the names of its contributors
425 // may be used to endorse or promote products derived from this software
426 // without specific prior written permission.
427
428 // THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
429 // IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
430 // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
431 // PURPOSE.
432
433----------------------------------------------------
434
435src/diagnostics/StackWalker.cpp
436src/diagnostics/StackWalker.h
437
438Copyright: 2005 Jochen Kalmbach
439
440
441 Under BSD License: http://www.opensource.org/licenses/bsd-license.php
442
443----------------------------------------------------
444
445src/util/singleton.h
446src/util/threads.h
447
448Copyright: 2001 Andrei Alexandrescu
449
450
451 This code accompanies the book:
452 Alexandrescu, Andrei. "Modern C++ Design: Generic Programming and Design
453 Patterns Applied". Copyright (c) 2001. Addison-Wesley.
454 Permission to use, copy, modify, distribute and sell this software for any
455 purpose is hereby granted without fee, provided that the above copyright
456 notice appear in all copies and that both that copyright notice and this
457 permission notice appear in supporting documentation.
458 The author or Addison-Wesley Longman make no representations about the
459 suitability of this software for any purpose. It is provided "as is"
460 without express or implied warranty.
461
462
463External libraries used by this project:
464----------------------------------------------------
465
466Name: LIBXML2
467Preferred version: 2.2.16 or higher
468Is mandatory: true
469Website: http://xmlsoft.org/
470License: MIT
471Copyright: 1998-2002 Daniel Veillard. All Rights Reserved.
472External notice:
473
474 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:
475
476 The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
477
478 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.
479
480 Except as contained in this notice, the name of Daniel Veillard shall not
481 be used in advertising or otherwise to promote the sale, use or other deal-
482 ings in this Software without prior written authorization from him.
483
484----------------------------------------------------
485
486Name: LIBXSLT
487Preferred version: 1.1.26
488Is mandatory: false
489Website: http://xmlsoft.org/XSLT/
490License: MIT
491Copyright: 2001-2002 Daniel Veillard. All Rights Reserved.
492External 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 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.
499
500
501 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.
502
503
504----------------------------------------------------
505
506Name: ICU4C
507Preferred version: 3.6 or higher
508Is mandatory: true
509Website: http://www.icu-project.org/
510License: ICU License
511Copyright: 1995-2011 International Business Machines Corporation and others
512External 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, 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.
515
516 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.
517
518 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.
519
520----------------------------------------------------
521
522Name: CURL
523Preferred version: above 7.12
524Is mandatory: false
525Website: http://curl.haxx.se/
526License: MIT/X derivate license
527Copyright: 1996 - 2011, Daniel Stenberg, <daniel@haxx.se>.
528External notice:
529
530 All rights reserved.
531
532 Permission to use, copy, modify, and distribute this software for any purpose
533 with or without fee is hereby granted, provided that the above copyright
534 notice and this permission notice appear in all copies.
535
536 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
537 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
538 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN
539 NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
540 DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
541 OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
542 OR OTHER DEALINGS IN THE SOFTWARE.
543
544 Except as contained in this notice, the name of a copyright holder shall not
545 be used in advertising or otherwise to promote the sale, use or other dealings
546 in this Software without prior written authorization of the copyright holder.
547
548----------------------------------------------------
549
550Name: ICONV
551Preferred version: above 1.12
552Is mandatory: true
553Website: http://www.gnu.org/software/libiconv/
554License: LGPL
555Copyright: 1998, 2010 Free Software Foundation, Inc.
556External notice:
557
558----------------------------------------------------
559
560Name: ZLIB
561Preferred version: 1.2.5
562Is mandatory: true
563Website: http://www.zlib.net/
564Copyright: 1995-2004 Jean-loup Gailly and Mark Adler
565External notice:
566
567 This software is provided 'as-is', without any express or implied
568 warranty. In no event will the authors be held liable for any damages
569 arising from the use of this software.
570
571 Permission is granted to anyone to use this software for any purpose,
572 including commercial applications, and to alter it and redistribute it
573 freely, subject to the following restrictions:
574
575 1. The origin of this software must not be misrepresented; you must not
576 claim that you wrote the original software. If you use this software
577 in a product, an acknowledgment in the product documentation would be
578 appreciated but is not required.
579 2. Altered source versions must be plainly marked as such, and must not be
580 misrepresented as being the original software.
581 3. This notice may not be removed or altered from any source distribution.
582
583 Jean-loup Gailly jloup@gzip.org
584 Mark Adler madler@alumni.caltech.edu
585
586----------------------------------------------------
587
588Name: XERCES
589Preferred version: 2.8.0 or higher
590Is mandatory: true
591Website: http://xerces.apache.org/xerces-c/
592License: Apache 2
593Copyright: Copyright © 1999-2010 The Apache Software Foundation. All Rights Reserved.
594External notice:
595
596 http://www.apache.org/licenses/LICENSE-2.0
597
598----------------------------------------------------
599
600Name: BOOST (boost_filesystem)
601Preferred version: 1.32 or higher
602Is mandatory: false
603Website: http://www.boost.org/
604License: Boost Software License v1.0
605Copyright:
606 Beman Dawes, David Abrahams, 1998-2005.
607 Rene Rivera 2004-2007
608
609External notice:
610
611 Permission is hereby granted, free of charge, to any person or organization
612 obtaining a copy of the software and accompanying documentation covered by
613 this license (the "Software") to use, reproduce, display, distribute,
614 execute, and transmit the Software, and to prepare derivative works of the
615 Software, and to permit third-parties to whom the Software is furnished to
616 do so, all subject to the following:
617
618 The copyright notices in the Software and this entire statement, including
619 the above license grant, this restriction and the following disclaimer,
620 must be included in all copies of the Software, in whole or in part, and
621 all derivative works of the Software, unless such copies or derivative
622 works are solely in the form of machine-executable object code generated by
623 a source language processor.
624
625 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
626 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
627 FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
628 SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
629 FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
630 ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
631 DEALINGS IN THE SOFTWARE.
632
633
634External applications used by this project:
635----------------------------------------------------
636
637Name: FLEX
638Preferred version: 2.5.33
639Is mandatory: false
640Website: http://flex.sourceforge.net/
641Copyright:
642 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The Flex Project.
643 1990, 1997 The Regents of the University of California. All rights reserved.
644
645External notice:
646
647 Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
648
649 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
650 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.
651
652 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.
653
654 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.
655
656----------------------------------------------------
657
658Name: BISON
659Preferred version: 2.4 or higher
660Is mandatory: false
661Website: http://www.gnu.org/software/bison/
662License: GPL
663Copyright: 1998, 2001, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
664External notice:
665
666----------------------------------------------------
667
668Name: DOXYGEN
669Preferred version: v1.7.4
670Is mandatory: false
671Website: www.doxygen.org
672License: GPL
673Copyright: 1997-2011 by Dimitri van Heesch
674External notice:
675
676 Permission to use, copy, modify, and distribute this software and its documentation under the terms of the GNU General Public License is hereby granted.
677 No representations are made about the suitability of this software for any purpose.
678 It is provided "as is" without express or implied warranty.
679 See the GNU General Public License for more details.
680
681 Documents produced by doxygen are derivative works derived from the input used in their production; they are not affected by this license.
682
683----------------------------------------------------
684
685Name: CMAKE
686Preferred version: 2.8.4
687Is mandatory: true
688Website: http://www.cmake.org/
689License: Creative Commons Attribution-NoDerivs 3.0 Unported License
690Copyright: 2000-2009 Kitware, Inc., Insight Software Consortium. All rights reserved.
691External notice:
692
693 Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
694
695 Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
696
697 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.
698
699 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.
700
701 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.
702
703----------------------------------------------------
704
705Name: SWIG
706Preferred version: 2.0.4 or above
707Is mandatory: false
708Website: http://www.swig.org/
709License: GPL
710Copyright:
711 1995-2011 The SWIG Developers
712 2005-2006 Arizona Board of Regents (University of Arizona).
713 1998-2005 University of Chicago.
714 1995-1998 The University of Utah and the Regents of the University of California
715
716External notice:
717
718 SWIG is free software: you can redistribute it and/or modify it
719 under the terms of the GNU General Public License as published by
720 the Free Software Foundation, either version 3 of the License, or
721 (at your option) any later version. See the LICENSE-GPL file for
722 the full terms of the GNU General Public license version 3.
723
724 Portions of SWIG are also licensed under the terms of the licenses
725 in the file LICENSE-UNIVERSITIES. You must observe the terms of
726 these licenses, as well as the terms of the GNU General Public License,
727 when you distribute SWIG.
728
729 The SWIG library and examples, under the Lib and Examples top level
730 directories, are distributed under the following terms:
731
732 You may copy, modify, distribute, and make derivative works based on
733 this software, in source code or object code form, without
734 restriction. If you distribute the software to others, you may do
735 so according to the terms of your choice. This software is offered as
736 is, without warranty of any kind.
737
738 See the COPYRIGHT file for a list of contributors to SWIG and their
739 copyright notices.
740
0\ No newline at end of file741\ No newline at end of file
1742
=== removed file 'NOTICE.txt'
--- NOTICE.txt 2012-03-28 05:19:57 +0000
+++ NOTICE.txt 1970-01-01 00:00:00 +0000
@@ -1,740 +0,0 @@
1-----------
2Zorba 2.2.0
3-----------
4
5(Note: This file is generated automatically from NOTICE.xml.
6Please do not modify this file directly.)
7
8
9
10
11Apache 2
12
13 Copyright 2006-2011 The FLWOR Foundation
14
15 See LICENSE.txt for license information.
16
17 ------------------------
18 This product includes software developed at
19 The FLWOR Foundation (http://www.flworfound.org/).
20
21 ------------------------
22 Portions of this software were developed at the Systems
23 Group of the ETH Zurich, Switzerland.
24
25
26Other files used by this project:
27----------------------------------------------------
28
29src/zorbatypes/m_apm.h
30src/zorbatypes/mapm/
31
32Copyright: 1999-2007 Michael C. Ring
33Website: http://www.tc.umn.edu/~ringx004/mapm-main.html
34
35 This software is Freeware.
36
37 Permission to use, copy, and distribute this software and its
38 documentation for any purpose with or without fee is hereby granted,
39 provided that the above copyright notice appear in all copies and
40 that both that copyright notice and this permission notice appear
41 in supporting documentation.
42
43 Permission to modify the software is granted. Permission to distribute
44 the modified code is granted. Modifications are to be distributed by
45 using the file 'license.txt' as a template to modify the file header.
46 'license.txt' is available in the official MAPM distribution.
47
48 To distribute modified source code, insert the file 'license.txt'
49 at the top of all modified source code files and edit accordingly.
50
51 This software is provided "as is" without express or implied warranty.
52
53----------------------------------------------------
54
55src/zorbamisc/config/stdint.h
56
57Copyright: 2006 Alexander Chemeris
58
59
60 Redistribution and use in source and binary forms, with or without
61 modification, are permitted provided that the following conditions are met:
62
63 1. Redistributions of source code must retain the above copyright notice,
64 this list of conditions and the following disclaimer.
65
66 2. Redistributions in binary form must reproduce the above copyright
67 notice, this list of conditions and the following disclaimer in the
68 documentation and/or other materials provided with the distribution.
69
70 3. The name of the author may be used to endorse or promote products
71 derived from this software without specific prior written permission.
72
73 THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
74 WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
75 MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
76 EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
77 SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
78 PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
79 OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
80 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
81 OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
82 ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
83
84----------------------------------------------------
85
86src/zorbautils/stemmer/
87
88Copyright: 2001 Dr. Martin Porter
89
90
91 All the software given out on this Snowball site is covered by the BSD
92 License (see http://www.opensource.org/licenses/bsd-license.html), with
93 Copyright (c) 2001, Dr Martin Porter, and (for the Java developments)
94 Copyright (c) 2002, Richard Boulton.
95
96 Essentially, all this means is that you can do what you like with the code,
97 except claim another Copyright for it, or claim that it is issued under a
98 different license. The software is also issued without warranties, which
99 means that if anyone suffers through its use, they cannot come back and sue
100 you. You also have to alert anyone to whom you give the Snowball software to
101 the fact that it is covered by the BSD license.
102
103 We have not bothered to insert the licensing arrangement into the text of
104 the Snowball software.
105
106----------------------------------------------------
107
108src/util/less.h
109
110Copyright: 1998 Paul J. Lucas
111
112
113 Redistribution and use in source and binary forms, with or without
114 modification, are permitted provided that the following conditions are met:
115
116 o Redistributions of source code must retain the above copyright notice,
117 this list of conditions and the following disclaimer.
118
119 o Redistributions in binary form must reproduce the above copyright
120 notice, this list of conditions and the following disclaimer in the
121 documentation and/or other materials provided with the distribution.
122
123 o The name of the author may not be used to endorse or promote products
124 derived from this software without specific prior written permission.
125
126 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
127 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
128 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
129 ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
130 LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
131 CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
132 SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
133 INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
134 CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
135 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
136 POSSIBILITY OF SUCH DAMAGE.
137
138----------------------------------------------------
139
140src/util/auto_vector.h (has been modified)
141
142Copyright: 2003 Reliable Software
143
144
145 Redistribution and use in source and binary forms, with or without
146 modification, are permitted provided that the following conditions are met:
147
148 o Redistributions of source code must retain the above copyright notice,
149 this list of conditions and the following disclaimer.
150
151 o Redistributions in binary form must reproduce the above copyright
152 notice, this list of conditions and the following disclaimer in the
153 documentation and/or other materials provided with the distribution.
154
155 o The name of the author may not be used to endorse or promote products
156 derived from this software without specific prior written permission.
157
158 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
159 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
160 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
161 ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
162 LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
163 CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
164 SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
165 INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
166 CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
167 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
168 POSSIBILITY OF SUCH DAMAGE.
169
170----------------------------------------------------
171
172cmake_modules/FindBoost.cmake
173
174Copyright:
175 2006-2008 Andreas Schneider <mail@cynapses.org>
176 2007 Wengo
177 2007 Mike Jackson
178 2008 Andreas Pakulat <apaku@gmx.de>
179
180
181
182 Redistribution AND use is allowed according to the terms of the New BSD license.
183 For details see the accompanying COPYING-CMAKE-SCRIPTS file.
184
185----------------------------------------------------
186
187cmake_modules/FindJNI.cmake
188cmake_modules/FindPythonLibs.cmake
189cmake_modules/FindSWIG.cmake
190
191Copyright: 2001-2009 Kitware, Inc.
192
193
194 Distributed under the OSI-approved BSD License (the "License");
195 see accompanying file Copyright.txt for details.
196
197 This software is distributed WITHOUT ANY WARRANTY; without even the
198 implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
199 See the License for more information.
200
201 CMake - Cross Platform Makefile Generator
202 Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
203 All rights reserved.
204
205 Redistribution and use in source and binary forms, with or without
206 modification, are permitted provided that the following conditions
207 are met:
208
209 * Redistributions of source code must retain the above copyright
210 notice, this list of conditions and the following disclaimer.
211
212 * Redistributions in binary form must reproduce the above copyright
213 notice, this list of conditions and the following disclaimer in the
214 documentation and/or other materials provided with the distribution.
215
216 * Neither the names of Kitware, Inc., the Insight Software Consortium,
217 nor the names of their contributors may be used to endorse or promote
218 products derived from this software without specific prior written
219 permission.
220
221 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
222 "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
223 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
224 A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
225 HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
226 SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
227 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
228 DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
229 THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
230 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
231 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
232
233 ------------------------------------------------------------------------------
234
235 The above copyright and license notice applies to distributions of
236 CMake in source and binary form. Some source files contain additional
237 notices of original copyright by their contributors; see each source
238 for details. Third-party software packages supplied with CMake under
239 compatible licenses provide their own copyright notices documented in
240 corresponding subdirectories.
241
242 ------------------------------------------------------------------------------
243
244 CMake was initially developed by Kitware with the following sponsorship:
245
246 * National Library of Medicine at the National Institutes of Health
247 as part of the Insight Segmentation and Registration Toolkit (ITK).
248
249 * US National Labs (Los Alamos, Livermore, Sandia) ASC Parallel
250 Visualization Initiative.
251
252 * National Alliance for Medical Image Computing (NAMIC) is funded by the
253 National Institutes of Health through the NIH Roadmap for Medical Research,
254 Grant U54 EB005149.
255
256 * Kitware, Inc.
257
258----------------------------------------------------
259
260/xml.xsd
261
262Copyright: 2001 World Wide Web Consortium, (Massachusetts Institute of Technology, European Research Consortium for Informatics and Mathematics, Keio University)
263
264
265 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.
266
267 W3C Software Notice and License
268
269 This work (and included software, documentation such as READMEs, or other related items) is being provided by the copyright holders under the following license.
270
271 License
272
273 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.
274
275 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:
276 •The full text of this NOTICE in a location viewable to users of the redistributed or derivative work.
277 •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.
278 •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.)
279
280 Disclaimers
281
282 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.
283
284 COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR DOCUMENTATION.
285
286 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.
287
288----------------------------------------------------
289
290schemas/xslt-xquery-serialization.xsd
291
292Copyright: 2010 World Wide Web Consortium, (Massachusetts Institute of Technology, European Research Consortium for Informatics and Mathematics, Keio University)
293
294
295 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.
296
297 W3C Software Notice and License
298
299 This work (and included software, documentation such as READMEs, or other related items) is being provided by the copyright holders under the following license.
300
301 License
302
303 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.
304
305 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:
306 •The full text of this NOTICE in a location viewable to users of the redistributed or derivative work.
307 •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.
308 •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.)
309
310 Disclaimers
311
312 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.
313
314 COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR DOCUMENTATION.
315
316 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.
317
318----------------------------------------------------
319
320modules/w3c/xpath-functions.xsd
321
322Copyright: 2005 World Wide Web Consortium, (Massachusetts Institute of Technology, European Research Consortium for Informatics and Mathematics, Keio University)
323
324
325 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.
326
327 W3C Software Notice and License
328
329 This work (and included software, documentation such as READMEs, or other related items) is being provided by the copyright holders under the following license.
330
331 License
332
333 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.
334
335 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:
336 •The full text of this NOTICE in a location viewable to users of the redistributed or derivative work.
337 •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.
338 •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.)
339
340 Disclaimers
341
342 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.
343
344 COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR DOCUMENTATION.
345
346 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.
347
348----------------------------------------------------
349
350include/xqc.h
351
352Copyright: 2008, Matthias Brantner, John Snelson
353
354
355 * All rights reserved.
356 *
357 * Redistribution and use in source and binary forms, with or without
358 * modification, are permitted provided that the following conditions are met:
359 *
360 * * Redistributions of source code must retain the above copyright notice,
361 * this list of conditions and the following disclaimer.
362 * * Redistributions in binary form must reproduce the above copyright
363 * notice, this list of conditions and the following disclaimer in the
364 * documentation and/or other materials provided with the distribution.
365 * * Neither the name of the developers nor the names of contributors may be
366 * used to endorse or promote products derived from this software without
367 * specific prior written permission.
368 *
369 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
370 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
371 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
372 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
373 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
374 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
375 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
376 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
377 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
378 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
379 * POSSIBILITY OF SUCH DAMAGE.
380
381----------------------------------------------------
382
383modules/functx/functx.xq
384
385Copyright: 2007 Datypic
386
387
388 : This library is free software; you can redistribute it and/or
389 : modify it under the terms of the GNU Lesser General Public
390 : License as published by the Free Software Foundation; either
391 : version 2.1 of the License.
392
393 : This library is distributed in the hope that it will be useful,
394 : but WITHOUT ANY WARRANTY; without even the implied warranty of
395 : MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
396 : Lesser General Public License for more details.
397
398 : You should have received a copy of the GNU Lesser General Public
399 : License along with this library; if not, write to the Free Software
400 : Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
401
402----------------------------------------------------
403
404src/compiler/parser/FlexLexer.h
405
406Copyright: 1993 The Regents of the University of California
407
408
409 // All rights reserved.
410 //
411 // This code is derived from software contributed to Berkeley by
412 // Kent Williams and Tom Epperly.
413 //
414 // Redistribution and use in source and binary forms, with or without
415 // modification, are permitted provided that the following conditions
416 // are met:
417
418 // 1. Redistributions of source code must retain the above copyright
419 // notice, this list of conditions and the following disclaimer.
420 // 2. Redistributions in binary form must reproduce the above copyright
421 // notice, this list of conditions and the following disclaimer in the
422 // documentation and/or other materials provided with the distribution.
423
424 // Neither the name of the University nor the names of its contributors
425 // may be used to endorse or promote products derived from this software
426 // without specific prior written permission.
427
428 // THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
429 // IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
430 // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
431 // PURPOSE.
432
433----------------------------------------------------
434
435src/diagnostics/StackWalker.cpp
436src/diagnostics/StackWalker.h
437
438Copyright: 2005 Jochen Kalmbach
439
440
441 Under BSD License: http://www.opensource.org/licenses/bsd-license.php
442
443----------------------------------------------------
444
445src/util/singleton.h
446src/util/threads.h
447
448Copyright: 2001 Andrei Alexandrescu
449
450
451 This code accompanies the book:
452 Alexandrescu, Andrei. "Modern C++ Design: Generic Programming and Design
453 Patterns Applied". Copyright (c) 2001. Addison-Wesley.
454 Permission to use, copy, modify, distribute and sell this software for any
455 purpose is hereby granted without fee, provided that the above copyright
456 notice appear in all copies and that both that copyright notice and this
457 permission notice appear in supporting documentation.
458 The author or Addison-Wesley Longman make no representations about the
459 suitability of this software for any purpose. It is provided "as is"
460 without express or implied warranty.
461
462
463External libraries used by this project:
464----------------------------------------------------
465
466Name: LIBXML2
467Preferred version: 2.2.16 or higher
468Is mandatory: true
469Website: http://xmlsoft.org/
470License: MIT
471Copyright: 1998-2002 Daniel Veillard. All Rights Reserved.
472External notice:
473
474 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:
475
476 The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
477
478 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.
479
480 Except as contained in this notice, the name of Daniel Veillard shall not
481 be used in advertising or otherwise to promote the sale, use or other deal-
482 ings in this Software without prior written authorization from him.
483
484----------------------------------------------------
485
486Name: LIBXSLT
487Preferred version: 1.1.26
488Is mandatory: false
489Website: http://xmlsoft.org/XSLT/
490License: MIT
491Copyright: 2001-2002 Daniel Veillard. All Rights Reserved.
492External 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 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.
499
500
501 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.
502
503
504----------------------------------------------------
505
506Name: ICU4C
507Preferred version: 3.6 or higher
508Is mandatory: true
509Website: http://www.icu-project.org/
510License: ICU License
511Copyright: 1995-2011 International Business Machines Corporation and others
512External 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, 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.
515
516 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.
517
518 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.
519
520----------------------------------------------------
521
522Name: CURL
523Preferred version: above 7.12
524Is mandatory: false
525Website: http://curl.haxx.se/
526License: MIT/X derivate license
527Copyright: 1996 - 2011, Daniel Stenberg, <daniel@haxx.se>.
528External notice:
529
530 All rights reserved.
531
532 Permission to use, copy, modify, and distribute this software for any purpose
533 with or without fee is hereby granted, provided that the above copyright
534 notice and this permission notice appear in all copies.
535
536 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
537 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
538 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN
539 NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
540 DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
541 OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
542 OR OTHER DEALINGS IN THE SOFTWARE.
543
544 Except as contained in this notice, the name of a copyright holder shall not
545 be used in advertising or otherwise to promote the sale, use or other dealings
546 in this Software without prior written authorization of the copyright holder.
547
548----------------------------------------------------
549
550Name: ICONV
551Preferred version: above 1.12
552Is mandatory: true
553Website: http://www.gnu.org/software/libiconv/
554License: LGPL
555Copyright: 1998, 2010 Free Software Foundation, Inc.
556External notice:
557
558----------------------------------------------------
559
560Name: ZLIB
561Preferred version: 1.2.5
562Is mandatory: true
563Website: http://www.zlib.net/
564Copyright: 1995-2004 Jean-loup Gailly and Mark Adler
565External notice:
566
567 This software is provided 'as-is', without any express or implied
568 warranty. In no event will the authors be held liable for any damages
569 arising from the use of this software.
570
571 Permission is granted to anyone to use this software for any purpose,
572 including commercial applications, and to alter it and redistribute it
573 freely, subject to the following restrictions:
574
575 1. The origin of this software must not be misrepresented; you must not
576 claim that you wrote the original software. If you use this software
577 in a product, an acknowledgment in the product documentation would be
578 appreciated but is not required.
579 2. Altered source versions must be plainly marked as such, and must not be
580 misrepresented as being the original software.
581 3. This notice may not be removed or altered from any source distribution.
582
583 Jean-loup Gailly jloup@gzip.org
584 Mark Adler madler@alumni.caltech.edu
585
586----------------------------------------------------
587
588Name: XERCES
589Preferred version: 2.8.0 or higher
590Is mandatory: true
591Website: http://xerces.apache.org/xerces-c/
592License: Apache 2
593Copyright: Copyright © 1999-2010 The Apache Software Foundation. All Rights Reserved.
594External notice:
595
596 http://www.apache.org/licenses/LICENSE-2.0
597
598----------------------------------------------------
599
600Name: BOOST (boost_filesystem)
601Preferred version: 1.32 or higher
602Is mandatory: false
603Website: http://www.boost.org/
604License: Boost Software License v1.0
605Copyright:
606 Beman Dawes, David Abrahams, 1998-2005.
607 Rene Rivera 2004-2007
608
609External notice:
610
611 Permission is hereby granted, free of charge, to any person or organization
612 obtaining a copy of the software and accompanying documentation covered by
613 this license (the "Software") to use, reproduce, display, distribute,
614 execute, and transmit the Software, and to prepare derivative works of the
615 Software, and to permit third-parties to whom the Software is furnished to
616 do so, all subject to the following:
617
618 The copyright notices in the Software and this entire statement, including
619 the above license grant, this restriction and the following disclaimer,
620 must be included in all copies of the Software, in whole or in part, and
621 all derivative works of the Software, unless such copies or derivative
622 works are solely in the form of machine-executable object code generated by
623 a source language processor.
624
625 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
626 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
627 FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
628 SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
629 FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
630 ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
631 DEALINGS IN THE SOFTWARE.
632
633
634External applications used by this project:
635----------------------------------------------------
636
637Name: FLEX
638Preferred version: 2.5.33
639Is mandatory: false
640Website: http://flex.sourceforge.net/
641Copyright:
642 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The Flex Project.
643 1990, 1997 The Regents of the University of California. All rights reserved.
644
645External notice:
646
647 Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
648
649 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
650 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.
651
652 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.
653
654 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.
655
656----------------------------------------------------
657
658Name: BISON
659Preferred version: 2.4 or higher
660Is mandatory: false
661Website: http://www.gnu.org/software/bison/
662License: GPL
663Copyright: 1998, 2001, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
664External notice:
665
666----------------------------------------------------
667
668Name: DOXYGEN
669Preferred version: v1.7.4
670Is mandatory: false
671Website: www.doxygen.org
672License: GPL
673Copyright: 1997-2011 by Dimitri van Heesch
674External notice:
675
676 Permission to use, copy, modify, and distribute this software and its documentation under the terms of the GNU General Public License is hereby granted.
677 No representations are made about the suitability of this software for any purpose.
678 It is provided "as is" without express or implied warranty.
679 See the GNU General Public License for more details.
680
681 Documents produced by doxygen are derivative works derived from the input used in their production; they are not affected by this license.
682
683----------------------------------------------------
684
685Name: CMAKE
686Preferred version: 2.8.4
687Is mandatory: true
688Website: http://www.cmake.org/
689License: Creative Commons Attribution-NoDerivs 3.0 Unported License
690Copyright: 2000-2009 Kitware, Inc., Insight Software Consortium. All rights reserved.
691External notice:
692
693 Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
694
695 Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
696
697 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.
698
699 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.
700
701 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.
702
703----------------------------------------------------
704
705Name: SWIG
706Preferred version: 2.0.4 or above
707Is mandatory: false
708Website: http://www.swig.org/
709License: GPL
710Copyright:
711 1995-2011 The SWIG Developers
712 2005-2006 Arizona Board of Regents (University of Arizona).
713 1998-2005 University of Chicago.
714 1995-1998 The University of Utah and the Regents of the University of California
715
716External notice:
717
718 SWIG is free software: you can redistribute it and/or modify it
719 under the terms of the GNU General Public License as published by
720 the Free Software Foundation, either version 3 of the License, or
721 (at your option) any later version. See the LICENSE-GPL file for
722 the full terms of the GNU General Public license version 3.
723
724 Portions of SWIG are also licensed under the terms of the licenses
725 in the file LICENSE-UNIVERSITIES. You must observe the terms of
726 these licenses, as well as the terms of the GNU General Public License,
727 when you distribute SWIG.
728
729 The SWIG library and examples, under the Lib and Examples top level
730 directories, are distributed under the following terms:
731
732 You may copy, modify, distribute, and make derivative works based on
733 this software, in source code or object code form, without
734 restriction. If you distribute the software to others, you may do
735 so according to the terms of your choice. This software is offered as
736 is, without warranty of any kind.
737
738 See the COPYRIGHT file for a list of contributors to SWIG and their
739 copyright notices.
740
741\ No newline at end of file0\ No newline at end of file
7421
=== modified file 'include/zorba/pregenerated/diagnostic_list.h'
--- include/zorba/pregenerated/diagnostic_list.h 2012-03-28 05:19:57 +0000
+++ include/zorba/pregenerated/diagnostic_list.h 2012-04-13 23:36:23 +0000
@@ -286,6 +286,10 @@
286286
287extern ZORBA_DLL_PUBLIC XQueryErrorCode FOTY0015;287extern ZORBA_DLL_PUBLIC XQueryErrorCode FOTY0015;
288288
289extern ZORBA_DLL_PUBLIC XQueryErrorCode FOUT1170;
290
291extern ZORBA_DLL_PUBLIC XQueryErrorCode FOUT1190;
292
289extern ZORBA_DLL_PUBLIC XQueryErrorCode XUST0001;293extern ZORBA_DLL_PUBLIC XQueryErrorCode XUST0001;
290294
291extern ZORBA_DLL_PUBLIC XQueryErrorCode XUST0002;295extern ZORBA_DLL_PUBLIC XQueryErrorCode XUST0002;
292296
=== modified file 'modules/w3c/pregenerated/xqt-errors.xq'
--- modules/w3c/pregenerated/xqt-errors.xq 2012-03-28 05:19:57 +0000
+++ modules/w3c/pregenerated/xqt-errors.xq 2012-04-13 23:36:23 +0000
@@ -1240,6 +1240,24 @@
12401240
1241(:~1241(:~
1242 :1242 :
1243 : Identifier cannot be used to retrive a resource containing text
1244 :
1245 : @see http://www.w3.org/2005/xqt-errors
1246:)
1247declare variable $err:FOUT1170 as xs:QName := fn:QName($err:NS, "err:FOUT1170");
1248
1249(:~
1250 :
1251 : Retrieved resource contains octets that cannot be decoded into Unicode
1252 : using the specified encoding, the resulting characters are not
1253 : permitted XML characters or requested encoding not supported
1254 :
1255 : @see http://www.w3.org/2005/xqt-errors
1256:)
1257declare variable $err:FOUT1190 as xs:QName := fn:QName($err:NS, "err:FOUT1190");
1258
1259(:~
1260 :
1243 : It is a static error if an updating expression is used in any position1261 : It is a static error if an updating expression is used in any position
1244 : other than one of the following:1262 : other than one of the following:
1245 : - The topmost expression in the body of a query.1263 : - The topmost expression in the body of a query.
12461264
=== modified file 'modules/w3c/xpath_functions.xq'
--- modules/w3c/xpath_functions.xq 2012-03-28 05:19:57 +0000
+++ modules/w3c/xpath_functions.xq 2012-04-13 23:36:23 +0000
@@ -994,4 +994,49 @@
994(:~994(:~
995 : @see for semantics please check <a href="http://www.w3.org/TR/xpath-functions-30/#func-string">fn:string</a>995 : @see for semantics please check <a href="http://www.w3.org/TR/xpath-functions-30/#func-string">fn:string</a>
996 :)996 :)
997declare function fn:string($arg as item()?) as xs:string external;
998\ No newline at end of file997\ No newline at end of file
998declare function fn:string($arg as item()?) as xs:string external;
999
1000(:~
1001 : @see for semantics please check <a href="http://www.w3.org/TR/xpath-functions-30/#func-available-environment-variables">fn:available-environment-variables</a>
1002 :)
1003declare function fn:available-environment-variables() as xs:string* external;
1004
1005(:~
1006 : @see for semantics please check <a href="http://www.w3.org/TR/xpath-functions-30/#func-environment-variable">fn:environment-variable</a>
1007 :)
1008declare function fn:environment-variable($arg as xs:string) as xs:string? external;
1009
1010(:~
1011 : @see for semantics please check <a href="http://www.w3.org/TR/xpath-functions-30/#func-unparsed-text">fn:unparsed-text</a>
1012 :)
1013declare function fn:unparsed-text($href as xs:string?) as xs:string? external;
1014
1015(:~
1016 : @see for semantics please check <a href="http://www.w3.org/TR/xpath-functions-30/#func-unparsed-text">fn:unparsed-text</a>
1017 :)
1018declare function fn:unparsed-text($href as xs:string?, $encoding as xs:string) as xs:string? external;
1019
1020(:~
1021 : @see for semantics please check <a href="http://www.w3.org/TR/xpath-functions-30/#func-unparsed-text-available">fn:unparsed-text-available</a>
1022 :)
1023declare function fn:unparsed-text-available($href as xs:string?) as xs:boolean external;
1024
1025(:~
1026 : @see for semantics please check <a href="http://www.w3.org/TR/xpath-functions-30/#func-unparsed-text-lines">fn:unparsed-text-lines</a>
1027 :)
1028declare function fn:unparsed-text-lines( $href as xs:string?, $encoding as xs:string) as xs:string* external;
1029
1030(:~
1031 : @see for semantics please check <a href="http://www.w3.org/TR/xpath-functions-30/#func-unparsed-text-available">fn:unparsed-text-available</a>
1032 :)
1033declare function fn:unparsed-text-available( $href as xs:string?, $encoding as xs:string) as xs:boolean external;
1034
1035(:~
1036 : @see for semantics please check <a href="http://www.w3.org/TR/xpath-functions-30/#func-uri-collection">fn:uri-collection</a>
1037 :)
1038declare function fn:uri-collection() as xs:anyURI* external;
1039
1040(:~
1041 : @see for semantics please check <a href="http://www.w3.org/TR/xpath-functions-30/#func-uri-collection">fn:uri-collection</a>
1042 :)
1043declare function fn:uri-collection($arg as xs:string?) as xs:anyURI* external;
9991044
=== modified file 'src/context/dynamic_context.cpp'
--- src/context/dynamic_context.cpp 2012-03-28 05:19:57 +0000
+++ src/context/dynamic_context.cpp 2012-04-13 23:36:23 +0000
@@ -21,6 +21,7 @@
21#include <sys/timeb.h>21#include <sys/timeb.h>
22#ifdef UNIX22#ifdef UNIX
23#include <sys/time.h>23#include <sys/time.h>
24#include <unistd.h>
24#endif25#endif
2526
26#include "store/api/iterator.h"27#include "store/api/iterator.h"
@@ -29,6 +30,7 @@
29#include "store/api/store.h"30#include "store/api/store.h"
30#include "store/api/index.h"31#include "store/api/index.h"
31#include "store/api/ic.h"32#include "store/api/ic.h"
33#include "store/api/iterator_factory.h"
3234
33#include "system/globalenv.h"35#include "system/globalenv.h"
3436
@@ -54,10 +56,13 @@
5456
55using namespace std;57using namespace std;
5658
59#ifdef UNIX
60//external variables
61extern char **environ;
62#endif
63
57namespace zorba64namespace zorba
58{65{
59
60
61/*******************************************************************************66/*******************************************************************************
6267
63********************************************************************************/68********************************************************************************/
@@ -122,6 +127,7 @@
122 theParent(NULL),127 theParent(NULL),
123 keymap(NULL),128 keymap(NULL),
124 theAvailableIndices(NULL),129 theAvailableIndices(NULL),
130 theEnvironmentVariables(NULL),
125 theDocLoadingUserTime(0.0),131 theDocLoadingUserTime(0.0),
126 theDocLoadingTime(0)132 theDocLoadingTime(0)
127{133{
@@ -161,6 +167,9 @@
161 delete keymap;167 delete keymap;
162 }168 }
163169
170 if(theEnvironmentVariables)
171 delete theEnvironmentVariables;
172
164 if (theAvailableIndices)173 if (theAvailableIndices)
165 delete theAvailableIndices;174 delete theAvailableIndices;
166}175}
@@ -259,6 +268,145 @@
259/*******************************************************************************268/*******************************************************************************
260269
261********************************************************************************/270********************************************************************************/
271void dynamic_context::set_environment_variables()
272{
273 if (!theEnvironmentVariables)
274 theEnvironmentVariables = new EnvVarMap();
275
276#if defined (WIN32)
277 LPTCH envVarsCH = GetEnvironmentStrings();
278 LPTSTR envVarsSTR = (LPTSTR) envVarsCH;
279
280 while (*envVarsSTR)
281 {
282 int size = lstrlen(envVarsSTR);
283
284 char * envVar = new char[size+1];
285
286
287 WideCharToMultiByte( CP_ACP,
288 WC_NO_BEST_FIT_CHARS|WC_COMPOSITECHECK|WC_DEFAULTCHAR,
289 envVarsSTR,
290 size+1,
291 envVar,
292 size+1,
293 NULL,
294 NULL);
295
296
297 zstring envVarZS(envVar);
298
299 int eqPos = envVarZS.find_first_of("=");
300
301 if (eqPos > 0)
302 {
303 zstring varname(envVarZS.substr(0, eqPos));
304 zstring varvalue(envVarZS.substr(eqPos+1, size));
305
306 if (!varname.empty() || !varvalue.empty())
307 theEnvironmentVariables->insert(std::pair<zstring, zstring>(varname,varvalue));
308 }
309
310 delete envVar;
311 envVarsSTR += lstrlen(envVarsSTR) + 1;
312 }
313
314 FreeEnvironmentStrings(envVarsCH);
315#else
316 const char* invalid_char;
317 for (char **env = environ; *env; ++env)
318 {
319 zstring envVarZS(*env);
320
321 if ((invalid_char = utf8::validate(envVarZS.c_str())) != NULL)
322 throw XQUERY_EXCEPTION(err::FOCH0001,
323 ERROR_PARAMS(zstring("#x") +
324 BUILD_STRING(std::uppercase << std::hex
325 << (static_cast<unsigned int>(*invalid_char)&0xFF))));
326
327 if ((invalid_char = utf8::validate(envVarZS.c_str())) != NULL)
328 {
329 throw XQUERY_EXCEPTION(err::FOCH0001,
330 ERROR_PARAMS(zstring("#x") +
331 BUILD_STRING(std::uppercase << std::hex
332 << (static_cast<unsigned int>(*invalid_char) & 0xFF)) ));
333 }
334
335 int size = envVarZS.size();
336
337 int eqPos = envVarZS.find_first_of("=");
338
339 if (eqPos > 0)
340 {
341 zstring varname(envVarZS.substr(0, eqPos));
342 zstring varvalue(envVarZS.substr(eqPos+1, size));
343
344 if (!varname.empty() || !varvalue.empty())
345 theEnvironmentVariables->insert(std::pair<zstring, zstring>(varname,varvalue));
346 }
347 }
348
349#endif
350
351}
352/*******************************************************************************
353
354********************************************************************************/
355store::Iterator_t dynamic_context::available_environment_variables()
356{
357 if (!theEnvironmentVariables)
358 {
359 set_environment_variables();
360 }
361
362 EnvVarMap::iterator lIte = theEnvironmentVariables->begin();
363 EnvVarMap::iterator lEnd = theEnvironmentVariables->end();
364
365 std::vector<store::Item_t> lVarNames;
366
367 for (;lIte != lEnd; ++lIte)
368 {
369 store::Item_t varname;
370 zstring zsvarname = lIte->first;
371 GENV_ITEMFACTORY->createString(varname, zsvarname);
372 lVarNames.push_back(varname);
373 }
374
375 if (lVarNames.empty())
376 {
377 return NULL;
378 }
379
380 return GENV_STORE.createTempSeq(lVarNames)->getIterator();
381}
382
383/*******************************************************************************
384
385********************************************************************************/
386store::Item_t dynamic_context::get_environment_variable(const zstring& varname)
387{
388
389 if (!theEnvironmentVariables)
390 {
391 set_environment_variables();
392 }
393
394 EnvVarMap::iterator lIter = theEnvironmentVariables->find(varname);
395
396 if (lIter == theEnvironmentVariables->end())
397 {
398 return NULL;
399 }
400
401 store::Item_t value;
402 zstring varvalue = lIter->second;
403 GENV_ITEMFACTORY->createString(value, varvalue);
404 return value;
405}
406
407/*******************************************************************************
408
409********************************************************************************/
262void dynamic_context::add_variable(ulong varid, store::Iterator_t& value) 410void dynamic_context::add_variable(ulong varid, store::Iterator_t& value)
263{411{
264 declare_variable(varid);412 declare_variable(varid);
@@ -607,7 +755,6 @@
607 {755 {
608 keymap = new ValueMap(8, false);756 keymap = new ValueMap(8, false);
609 }757 }
610
611 if (!keymap->insert(aName, val))758 if (!keymap->insert(aName, val))
612 {759 {
613 keymap->update(aName, val);760 keymap->update(aName, val);
614761
=== modified file 'src/context/dynamic_context.h'
--- src/context/dynamic_context.h 2012-03-28 05:19:57 +0000
+++ src/context/dynamic_context.h 2012-04-13 23:36:23 +0000
@@ -105,6 +105,8 @@
105105
106 typedef ItemPointerHashMap<store::Index_t> IndexMap;106 typedef ItemPointerHashMap<store::Index_t> IndexMap;
107107
108 typedef std::map<const zstring,const zstring> EnvVarMap;
109
108protected:110protected:
109 dynamic_context * theParent;111 dynamic_context * theParent;
110112
@@ -119,6 +121,9 @@
119121
120 IndexMap * theAvailableIndices;122 IndexMap * theAvailableIndices;
121123
124 //MODIFY
125 EnvVarMap * theEnvironmentVariables;
126
122public:127public:
123 double theDocLoadingUserTime;128 double theDocLoadingUserTime;
124 double theDocLoadingTime;129 double theDocLoadingTime;
@@ -142,6 +147,12 @@
142147
143 store::Item_t get_current_time_millis() const;148 store::Item_t get_current_time_millis() const;
144149
150 void set_environment_variables();
151
152 store::Item_t get_environment_variable(const zstring& varname);
153
154 store::Iterator_t available_environment_variables();
155
145 void set_implicit_timezone(long tzone_seconds);156 void set_implicit_timezone(long tzone_seconds);
146157
147 long get_implicit_timezone() const;158 long get_implicit_timezone() const;
148159
=== modified file 'src/diagnostics/diagnostic_en.xml'
--- src/diagnostics/diagnostic_en.xml 2012-04-10 13:10:22 +0000
+++ src/diagnostics/diagnostic_en.xml 2012-04-13 23:36:23 +0000
@@ -1142,7 +1142,23 @@
1142 An argument to \c fn:deep-equal() contains a function item.1142 An argument to \c fn:deep-equal() contains a function item.
1143 </comment>1143 </comment>
1144 <value>"$1": argument to fn:deep-equal() contains a function item</value>1144 <value>"$1": argument to fn:deep-equal() contains a function item</value>
1145 </diagnostic>
1146
1147 <diagnostic code="FOUT1170">
1148 <comment>
1149 Identifier cannot be used to retrive a resource containing text
1150 </comment>
1151 <value>"$1": error retrieving resource containing text</value>
1145 </diagnostic>1152 </diagnostic>
1153
1154 <diagnostic code="FOUT1190">
1155 <comment>
1156 Retrieved resource contains octets that cannot be decoded into Unicode
1157 using the specified encoding, the resulting characters are not
1158 permitted XML characters or requested encoding not supported
1159 </comment>
1160 <value>"$1": Cannot decode resource retrieved</value>
1161 </diagnostic>
11461162
1147 <!--////////// XQuery Update Facility //////////////////////////////////-->1163 <!--////////// XQuery Update Facility //////////////////////////////////-->
11481164
11491165
=== modified file 'src/diagnostics/pregenerated/diagnostic_list.cpp'
--- src/diagnostics/pregenerated/diagnostic_list.cpp 2012-03-28 05:19:57 +0000
+++ src/diagnostics/pregenerated/diagnostic_list.cpp 2012-04-13 23:36:23 +0000
@@ -411,6 +411,12 @@
411XQueryErrorCode FOTY0015( "FOTY0015" );411XQueryErrorCode FOTY0015( "FOTY0015" );
412412
413413
414XQueryErrorCode FOUT1170( "FOUT1170" );
415
416
417XQueryErrorCode FOUT1190( "FOUT1190" );
418
419
414XQueryErrorCode XUST0001( "XUST0001" );420XQueryErrorCode XUST0001( "XUST0001" );
415421
416422
417423
=== modified file 'src/diagnostics/pregenerated/dict_en.cpp'
--- src/diagnostics/pregenerated/dict_en.cpp 2012-04-10 13:10:22 +0000
+++ src/diagnostics/pregenerated/dict_en.cpp 2012-04-13 23:36:23 +0000
@@ -74,6 +74,8 @@
74 { "FOTY0015", "\"$1\": argument to fn:deep-equal() contains a function item" },74 { "FOTY0015", "\"$1\": argument to fn:deep-equal() contains a function item" },
75 { "FOUP0001", "first operand of fn:put() is not a node of a supported kind" },75 { "FOUP0001", "first operand of fn:put() is not a node of a supported kind" },
76 { "FOUP0002", "second operand of fn:put() is not a valid lexical representation of the xs:anyURI type" },76 { "FOUP0002", "second operand of fn:put() is not a valid lexical representation of the xs:anyURI type" },
77 { "FOUT1170", "\"$1\": error retrieving resource containing text" },
78 { "FOUT1190", "\"$1\": Cannot decode resource retrieved" },
77#if !defined(ZORBA_NO_FULL_TEXT)79#if !defined(ZORBA_NO_FULL_TEXT)
78 { "FTDY0016", "\"$1\": invalid weight: absolute value must be in [0,1000]" },80 { "FTDY0016", "\"$1\": invalid weight: absolute value must be in [0,1000]" },
79#endif81#endif
8082
=== added file 'src/functions/pregenerated/func_access.cpp'
--- src/functions/pregenerated/func_access.cpp 1970-01-01 00:00:00 +0000
+++ src/functions/pregenerated/func_access.cpp 2012-04-13 23:36:23 +0000
@@ -0,0 +1,111 @@
1/*
2 * Copyright 2006-2008 The FLWOR Foundation.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17// ******************************************
18// * *
19// * THIS IS A GENERATED FILE. DO NOT EDIT! *
20// * SEE .xml FILE WITH SAME NAME *
21// * *
22// ******************************************
23
24
25#include "stdafx.h"
26#include "runtime/access/access.h"
27#include "functions/func_access.h"
28
29
30namespace zorba{
31
32
33
34PlanIter_t fn_unparsed_text::codegen(
35 CompilerCB*,
36 static_context* sctx,
37 const QueryLoc& loc,
38 std::vector<PlanIter_t>& argv,
39 expr& ann) const
40{
41 return new FnUnparsedTextIterator(sctx, loc, argv);
42}
43
44PlanIter_t fn_unparsed_text_available::codegen(
45 CompilerCB*,
46 static_context* sctx,
47 const QueryLoc& loc,
48 std::vector<PlanIter_t>& argv,
49 expr& ann) const
50{
51 return new FnUnparsedTextAvailableIterator(sctx, loc, argv);
52}
53
54void populate_context_access(static_context* sctx)
55{
56 {
57
58
59 DECL_WITH_KIND(sctx, fn_unparsed_text,
60 (createQName("http://www.w3.org/2005/xpath-functions","","unparsed-text"),
61 GENV_TYPESYSTEM.STRING_TYPE_QUESTION,
62 GENV_TYPESYSTEM.STRING_TYPE_QUESTION),
63 FunctionConsts::FN_UNPARSED_TEXT_1);
64
65 }
66
67
68 {
69
70
71 DECL_WITH_KIND(sctx, fn_unparsed_text,
72 (createQName("http://www.w3.org/2005/xpath-functions","","unparsed-text"),
73 GENV_TYPESYSTEM.STRING_TYPE_QUESTION,
74 GENV_TYPESYSTEM.STRING_TYPE_ONE,
75 GENV_TYPESYSTEM.STRING_TYPE_QUESTION),
76 FunctionConsts::FN_UNPARSED_TEXT_2);
77
78 }
79
80
81 {
82
83
84 DECL_WITH_KIND(sctx, fn_unparsed_text_available,
85 (createQName("http://www.w3.org/2005/xpath-functions","","unparsed-text-available"),
86 GENV_TYPESYSTEM.STRING_TYPE_QUESTION,
87 GENV_TYPESYSTEM.STRING_TYPE_QUESTION),
88 FunctionConsts::FN_UNPARSED_TEXT_AVAILABLE_1);
89
90 }
91
92
93 {
94
95
96 DECL_WITH_KIND(sctx, fn_unparsed_text_available,
97 (createQName("http://www.w3.org/2005/xpath-functions","","unparsed-text-available"),
98 GENV_TYPESYSTEM.STRING_TYPE_QUESTION,
99 GENV_TYPESYSTEM.STRING_TYPE_ONE,
100 GENV_TYPESYSTEM.STRING_TYPE_QUESTION),
101 FunctionConsts::FN_UNPARSED_TEXT_AVAILABLE_2);
102
103 }
104
105}
106
107
108}
109
110
111
0112
=== added file 'src/functions/pregenerated/func_access.h'
--- src/functions/pregenerated/func_access.h 1970-01-01 00:00:00 +0000
+++ src/functions/pregenerated/func_access.h 2012-04-13 23:36:23 +0000
@@ -0,0 +1,79 @@
1/*
2 * Copyright 2006-2008 The FLWOR Foundation.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17// ******************************************
18// * *
19// * THIS IS A GENERATED FILE. DO NOT EDIT! *
20// * SEE .xml FILE WITH SAME NAME *
21// * *
22// ******************************************
23
24
25#ifndef ZORBA_FUNCTIONS_ACCESS_H
26#define ZORBA_FUNCTIONS_ACCESS_H
27
28
29#include "common/shared_types.h"
30#include "functions/function_impl.h"
31
32
33namespace zorba {
34
35
36void populate_context_access(static_context* sctx);
37
38
39
40
41//fn:unparsed-text
42class fn_unparsed_text : public function
43{
44public:
45 fn_unparsed_text(const signature& sig, FunctionConsts::FunctionKind kind)
46 :
47 function(sig, kind)
48 {
49
50 }
51
52 CODEGEN_DECL();
53};
54
55
56//fn:unparsed-text-available
57class fn_unparsed_text_available : public function
58{
59public:
60 fn_unparsed_text_available(const signature& sig, FunctionConsts::FunctionKind kind)
61 :
62 function(sig, kind)
63 {
64
65 }
66
67 CODEGEN_DECL();
68};
69
70
71} //namespace zorba
72
73
74#endif
75/*
76 * Local variables:
77 * mode: c++
78 * End:
79 */
080
=== modified file 'src/functions/pregenerated/func_collections.cpp'
--- src/functions/pregenerated/func_collections.cpp 2012-03-28 23:58:23 +0000
+++ src/functions/pregenerated/func_collections.cpp 2012-04-13 23:36:23 +0000
@@ -171,6 +171,16 @@
171 return new DeclaredICsIterator(sctx, loc, argv);171 return new DeclaredICsIterator(sctx, loc, argv);
172}172}
173173
174PlanIter_t fn_uri_collection_3_0::codegen(
175 CompilerCB*,
176 static_context* sctx,
177 const QueryLoc& loc,
178 std::vector<PlanIter_t>& argv,
179 expr& ann) const
180{
181 return new FnURICollectionIterator(sctx, loc, argv);
182}
183
174void populate_context_collections(static_context* sctx)184void populate_context_collections(static_context* sctx)
175{185{
176 {186 {
@@ -892,6 +902,29 @@
892902
893 }903 }
894904
905
906 {
907
908
909 DECL_WITH_KIND(sctx, fn_uri_collection_3_0,
910 (createQName("http://www.w3.org/2005/xpath-functions","","uri-collection"),
911 GENV_TYPESYSTEM.ANY_URI_TYPE_STAR),
912 FunctionConsts::FN_URI_COLLECTION_0);
913
914 }
915
916
917 {
918
919
920 DECL_WITH_KIND(sctx, fn_uri_collection_3_0,
921 (createQName("http://www.w3.org/2005/xpath-functions","","uri-collection"),
922 GENV_TYPESYSTEM.STRING_TYPE_QUESTION,
923 GENV_TYPESYSTEM.ANY_URI_TYPE_STAR),
924 FunctionConsts::FN_URI_COLLECTION_1);
925
926 }
927
895}928}
896929
897930
898931
=== modified file 'src/functions/pregenerated/func_collections.h'
--- src/functions/pregenerated/func_collections.h 2012-03-28 23:58:23 +0000
+++ src/functions/pregenerated/func_collections.h 2012-04-13 23:36:23 +0000
@@ -664,6 +664,21 @@
664};664};
665665
666666
667//fn:uri-collection
668class fn_uri_collection_3_0 : public function
669{
670public:
671 fn_uri_collection_3_0(const signature& sig, FunctionConsts::FunctionKind kind)
672 :
673 function(sig, kind)
674 {
675theXQueryVersion = StaticContextConsts::xquery_version_3_0;
676 }
677
678 CODEGEN_DECL();
679};
680
681
667} //namespace zorba682} //namespace zorba
668683
669684
670685
=== modified file 'src/functions/pregenerated/func_sequences.cpp'
--- src/functions/pregenerated/func_sequences.cpp 2012-03-28 23:58:23 +0000
+++ src/functions/pregenerated/func_sequences.cpp 2012-04-13 23:36:23 +0000
@@ -259,6 +259,56 @@
259 return new FnDocAvailableIterator(sctx, loc, argv);259 return new FnDocAvailableIterator(sctx, loc, argv);
260}260}
261261
262PlanIter_t fn_available_environment_variables_3_0::codegen(
263 CompilerCB*,
264 static_context* sctx,
265 const QueryLoc& loc,
266 std::vector<PlanIter_t>& argv,
267 expr& ann) const
268{
269 return new FnAvailableEnvironmentVariablesIterator(sctx, loc, argv);
270}
271
272PlanIter_t fn_environment_variable_3_0::codegen(
273 CompilerCB*,
274 static_context* sctx,
275 const QueryLoc& loc,
276 std::vector<PlanIter_t>& argv,
277 expr& ann) const
278{
279 return new FnEnvironmentVariableIterator(sctx, loc, argv);
280}
281
282PlanIter_t fn_unparsed_text_3_0::codegen(
283 CompilerCB*,
284 static_context* sctx,
285 const QueryLoc& loc,
286 std::vector<PlanIter_t>& argv,
287 expr& ann) const
288{
289 return new FnUnparsedTextIterator(sctx, loc, argv);
290}
291
292PlanIter_t fn_unparsed_text_available_3_0::codegen(
293 CompilerCB*,
294 static_context* sctx,
295 const QueryLoc& loc,
296 std::vector<PlanIter_t>& argv,
297 expr& ann) const
298{
299 return new FnUnparsedTextAvailableIterator(sctx, loc, argv);
300}
301
302PlanIter_t fn_unparsed_text_lines_3_0::codegen(
303 CompilerCB*,
304 static_context* sctx,
305 const QueryLoc& loc,
306 std::vector<PlanIter_t>& argv,
307 expr& ann) const
308{
309 return new FnUnparsedTextLinesIterator(sctx, loc, argv);
310}
311
262void populate_context_sequences(static_context* sctx)312void populate_context_sequences(static_context* sctx)
263{313{
264 {314 {
@@ -766,6 +816,104 @@
766816
767 }817 }
768818
819
820 {
821
822
823 DECL_WITH_KIND(sctx, fn_available_environment_variables_3_0,
824 (createQName("http://www.w3.org/2005/xpath-functions","","available-environment-variables"),
825 GENV_TYPESYSTEM.STRING_TYPE_STAR),
826 FunctionConsts::FN_AVAILABLE_ENVIRONMENT_VARIABLES_0);
827
828 }
829
830
831 {
832
833
834 DECL_WITH_KIND(sctx, fn_environment_variable_3_0,
835 (createQName("http://www.w3.org/2005/xpath-functions","","environment-variable"),
836 GENV_TYPESYSTEM.STRING_TYPE_ONE,
837 GENV_TYPESYSTEM.STRING_TYPE_QUESTION),
838 FunctionConsts::FN_ENVIRONMENT_VARIABLE_1);
839
840 }
841
842
843 {
844
845
846 DECL_WITH_KIND(sctx, fn_unparsed_text_3_0,
847 (createQName("http://www.w3.org/2005/xpath-functions","","unparsed-text"),
848 GENV_TYPESYSTEM.STRING_TYPE_QUESTION,
849 GENV_TYPESYSTEM.STRING_TYPE_QUESTION),
850 FunctionConsts::FN_UNPARSED_TEXT_1);
851
852 }
853
854
855 {
856
857
858 DECL_WITH_KIND(sctx, fn_unparsed_text_3_0,
859 (createQName("http://www.w3.org/2005/xpath-functions","","unparsed-text"),
860 GENV_TYPESYSTEM.STRING_TYPE_QUESTION,
861 GENV_TYPESYSTEM.STRING_TYPE_ONE,
862 GENV_TYPESYSTEM.STRING_TYPE_QUESTION),
863 FunctionConsts::FN_UNPARSED_TEXT_2);
864
865 }
866
867
868 {
869
870
871 DECL_WITH_KIND(sctx, fn_unparsed_text_available_3_0,
872 (createQName("http://www.w3.org/2005/xpath-functions","","unparsed-text-available"),
873 GENV_TYPESYSTEM.STRING_TYPE_QUESTION,
874 GENV_TYPESYSTEM.STRING_TYPE_QUESTION),
875 FunctionConsts::FN_UNPARSED_TEXT_AVAILABLE_1);
876
877 }
878
879
880 {
881
882
883 DECL_WITH_KIND(sctx, fn_unparsed_text_available_3_0,
884 (createQName("http://www.w3.org/2005/xpath-functions","","unparsed-text-available"),
885 GENV_TYPESYSTEM.STRING_TYPE_QUESTION,
886 GENV_TYPESYSTEM.STRING_TYPE_ONE,
887 GENV_TYPESYSTEM.STRING_TYPE_QUESTION),
888 FunctionConsts::FN_UNPARSED_TEXT_AVAILABLE_2);
889
890 }
891
892
893 {
894
895
896 DECL_WITH_KIND(sctx, fn_unparsed_text_lines_3_0,
897 (createQName("http://www.w3.org/2005/xpath-functions","","unparsed-text-lines"),
898 GENV_TYPESYSTEM.STRING_TYPE_QUESTION,
899 GENV_TYPESYSTEM.STRING_TYPE_STAR),
900 FunctionConsts::FN_UNPARSED_TEXT_LINES_1);
901
902 }
903
904
905 {
906
907
908 DECL_WITH_KIND(sctx, fn_unparsed_text_lines_3_0,
909 (createQName("http://www.w3.org/2005/xpath-functions","","unparsed-text-lines"),
910 GENV_TYPESYSTEM.STRING_TYPE_QUESTION,
911 GENV_TYPESYSTEM.STRING_TYPE_ONE,
912 GENV_TYPESYSTEM.STRING_TYPE_STAR),
913 FunctionConsts::FN_UNPARSED_TEXT_LINES_2);
914
915 }
916
769}917}
770918
771919
772920
=== modified file 'src/functions/pregenerated/func_sequences.h'
--- src/functions/pregenerated/func_sequences.h 2012-03-28 23:58:23 +0000
+++ src/functions/pregenerated/func_sequences.h 2012-04-13 23:36:23 +0000
@@ -622,6 +622,81 @@
622};622};
623623
624624
625//fn:available-environment-variables
626class fn_available_environment_variables_3_0 : public function
627{
628public:
629 fn_available_environment_variables_3_0(const signature& sig, FunctionConsts::FunctionKind kind)
630 :
631 function(sig, kind)
632 {
633theXQueryVersion = StaticContextConsts::xquery_version_3_0;
634 }
635
636 CODEGEN_DECL();
637};
638
639
640//fn:environment-variable
641class fn_environment_variable_3_0 : public function
642{
643public:
644 fn_environment_variable_3_0(const signature& sig, FunctionConsts::FunctionKind kind)
645 :
646 function(sig, kind)
647 {
648theXQueryVersion = StaticContextConsts::xquery_version_3_0;
649 }
650
651 CODEGEN_DECL();
652};
653
654
655//fn:unparsed-text
656class fn_unparsed_text_3_0 : public function
657{
658public:
659 fn_unparsed_text_3_0(const signature& sig, FunctionConsts::FunctionKind kind)
660 :
661 function(sig, kind)
662 {
663theXQueryVersion = StaticContextConsts::xquery_version_3_0;
664 }
665
666 CODEGEN_DECL();
667};
668
669
670//fn:unparsed-text-available
671class fn_unparsed_text_available_3_0 : public function
672{
673public:
674 fn_unparsed_text_available_3_0(const signature& sig, FunctionConsts::FunctionKind kind)
675 :
676 function(sig, kind)
677 {
678theXQueryVersion = StaticContextConsts::xquery_version_3_0;
679 }
680
681 CODEGEN_DECL();
682};
683
684
685//fn:unparsed-text-lines
686class fn_unparsed_text_lines_3_0 : public function
687{
688public:
689 fn_unparsed_text_lines_3_0(const signature& sig, FunctionConsts::FunctionKind kind)
690 :
691 function(sig, kind)
692 {
693theXQueryVersion = StaticContextConsts::xquery_version_3_0;
694 }
695
696 CODEGEN_DECL();
697};
698
699
625} //namespace zorba700} //namespace zorba
626701
627702
628703
=== modified file 'src/functions/pregenerated/function_enum.h'
--- src/functions/pregenerated/function_enum.h 2012-03-28 05:19:57 +0000
+++ src/functions/pregenerated/function_enum.h 2012-04-13 23:36:23 +0000
@@ -97,6 +97,8 @@
97 ZORBA_STORE_INDEXES_STATIC_DDL_DECLARED_INDEXES_0,97 ZORBA_STORE_INDEXES_STATIC_DDL_DECLARED_INDEXES_0,
98 ZORBA_STORE_INTEGRITY_CONSTRAINTS_STATIC_DDL_IS_DECLARED_INTEGRITY_CONSTRAINT_1,98 ZORBA_STORE_INTEGRITY_CONSTRAINTS_STATIC_DDL_IS_DECLARED_INTEGRITY_CONSTRAINT_1,
99 ZORBA_STORE_INTEGRITY_CONSTRAINTS_STATIC_DDL_DECLARED_INTEGRITY_CONSTRAINTS_0,99 ZORBA_STORE_INTEGRITY_CONSTRAINTS_STATIC_DDL_DECLARED_INTEGRITY_CONSTRAINTS_0,
100 FN_URI_COLLECTION_0,
101 FN_URI_COLLECTION_1,
100 FN_CURRENT_DATETIME_0,102 FN_CURRENT_DATETIME_0,
101 FN_CURRENT_DATE_0,103 FN_CURRENT_DATE_0,
102 FN_CURRENT_TIME_0,104 FN_CURRENT_TIME_0,
@@ -317,6 +319,14 @@
317 FN_IDREF_2,319 FN_IDREF_2,
318 FN_DOC_1,320 FN_DOC_1,
319 FN_DOC_AVAILABLE_1,321 FN_DOC_AVAILABLE_1,
322 FN_AVAILABLE_ENVIRONMENT_VARIABLES_0,
323 FN_ENVIRONMENT_VARIABLE_1,
324 FN_UNPARSED_TEXT_1,
325 FN_UNPARSED_TEXT_2,
326 FN_UNPARSED_TEXT_AVAILABLE_1,
327 FN_UNPARSED_TEXT_AVAILABLE_2,
328 FN_UNPARSED_TEXT_LINES_1,
329 FN_UNPARSED_TEXT_LINES_2,
320 ZORBA_STORE_DOCUMENTS_PUT_2,330 ZORBA_STORE_DOCUMENTS_PUT_2,
321 ZORBA_STORE_DOCUMENTS_REMOVE_1,331 ZORBA_STORE_DOCUMENTS_REMOVE_1,
322 ZORBA_STORE_DOCUMENTS_DOCUMENT_1,332 ZORBA_STORE_DOCUMENTS_DOCUMENT_1,
323333
=== modified file 'src/runtime/collections/collections_impl.cpp'
--- src/runtime/collections/collections_impl.cpp 2012-04-13 09:17:58 +0000
+++ src/runtime/collections/collections_impl.cpp 2012-04-13 23:36:23 +0000
@@ -2493,5 +2493,127 @@
2493 STACK_END(lState);2493 STACK_END(lState);
2494}2494}
24952495
2496
2497/*******************************************************************************
2498 14.8.5 fn:uri-collection
2499********************************************************************************/
2500 FnURICollectionIteratorState::~FnURICollectionIteratorState()
2501 {
2502 if(theIterator != NULL)
2503 {
2504 if(theIteratorOpened)
2505 {
2506 theIterator->close();
2507 theIteratorOpened = false;
2508 }
2509 theIterator = NULL;
2510 }
2511 }
2512
2513 void FnURICollectionIteratorState::init(PlanState& planState)
2514 {
2515 PlanIteratorState::init(planState);
2516 theIterator = NULL;
2517 }
2518
2519 void FnURICollectionIteratorState::reset(PlanState& planState)
2520 {
2521 PlanIteratorState::reset(planState);
2522
2523 if(theIterator != NULL)
2524 {
2525 if(theIteratorOpened)
2526 {
2527 theIterator->close();
2528 theIteratorOpened = false;
2529 }
2530 theIterator = NULL;
2531 }
2532 }
2533
2534 bool FnURICollectionIterator::nextImpl(store::Item_t& result, PlanState& planState) const
2535 {
2536 store::Item_t lURI, resolvedURIItem, lIte;
2537 store::Collection_t coll;
2538 std::auto_ptr<internal::Resource> lResource;
2539 internal::CollectionResource* lCollResource;
2540 zstring resolvedURIString;
2541 zstring lErrorMessage;
2542 zstring docuri;
2543
2544 FnURICollectionIteratorState* state;
2545 DEFAULT_STACK_INIT(FnURICollectionIteratorState, state, planState);
2546
2547 if(theChildren.size() == 1 &&
2548 consumeNext(lURI, theChildren[0].getp(),planState))
2549 {
2550 try
2551 {
2552 resolvedURIString= theSctx->resolve_relative_uri(lURI->getStringValue());
2553 }
2554 catch (ZorbaException const&)
2555 {
2556 throw XQUERY_EXCEPTION(
2557 err::FODC0004,
2558 ERROR_PARAMS(lURI->getStringValue(), ZED( BadAnyURI ) ),
2559 ERROR_LOC( loc )
2560 );
2561 }
2562 }
2563 else
2564 {
2565 resolvedURIItem = planState.theGlobalDynCtx->get_default_collection();
2566
2567 if ( NULL == resolvedURIItem )
2568 throw XQUERY_EXCEPTION(
2569 err::FODC0002,
2570 ERROR_PARAMS( ZED( DefaultCollection), ZED( NotDefInDynamicCtx ) ),
2571 ERROR_LOC( loc )
2572 );
2573
2574 resolvedURIString = theSctx->resolve_relative_uri(resolvedURIItem->getStringValue());
2575 }
2576
2577 lResource = theSctx->resolve_uri(resolvedURIString,
2578 internal::EntityData::COLLECTION,
2579 lErrorMessage);
2580
2581 lCollResource = dynamic_cast<internal::CollectionResource*>(lResource.get());
2582
2583 if( lCollResource == 0 || !(coll = lCollResource->getCollection()) )
2584 {
2585 throw XQUERY_EXCEPTION(
2586 err::FODC0002,
2587 ERROR_PARAMS( resolvedURIString, lErrorMessage ),
2588 ERROR_LOC( loc )
2589 );
2590 }
2591
2592 // return collection nodes
2593 state->theIterator = coll->getIterator();
2594 ZORBA_ASSERT(state->theIterator != NULL);
2595 state->theIterator->open();
2596 state->theIteratorOpened = true;
2597
2598 //return the DocumentURI of the Collection
2599 while(state->theIterator->next(lIte))
2600 {
2601 lIte->getDocumentURI(docuri);
2602 if(!docuri.empty())
2603 {
2604 STACK_PUSH(GENV_ITEMFACTORY->createAnyURI(result, docuri), state);
2605 }
2606 }
2607
2608 //close iterator
2609 state->theIterator->close();
2610 state->theIteratorOpened = false;
2611
2612 STACK_PUSH(false, state);
2613 STACK_END(state);
2614
2615 }
2616
2617
2496} // namespace zorba2618} // namespace zorba
2497/* vim:set et sw=2 ts=2: */2619/* vim:set et sw=2 ts=2: */
24982620
=== modified file 'src/runtime/collections/pregenerated/collections.cpp'
--- src/runtime/collections/pregenerated/collections.cpp 2012-04-08 21:39:25 +0000
+++ src/runtime/collections/pregenerated/collections.cpp 2012-04-13 23:36:23 +0000
@@ -773,6 +773,30 @@
773// </DeclaredICsIterator>773// </DeclaredICsIterator>
774774
775775
776// <FnURICollectionIterator>
777FnURICollectionIterator::class_factory<FnURICollectionIterator>
778FnURICollectionIterator::g_class_factory;
779
780
781void FnURICollectionIterator::accept(PlanIterVisitor& v) const {
782 v.beginVisit(*this);
783
784 std::vector<PlanIter_t>::const_iterator lIter = theChildren.begin();
785 std::vector<PlanIter_t>::const_iterator lEnd = theChildren.end();
786 for ( ; lIter != lEnd; ++lIter ){
787 (*lIter)->accept(v);
788 }
789
790 v.endVisit(*this);
791}
792
793FnURICollectionIterator::~FnURICollectionIterator() {}
794
795FnURICollectionIteratorState::FnURICollectionIteratorState() {}
796
797// </FnURICollectionIterator>
798
799
776800
777}801}
778802
779803
=== modified file 'src/runtime/collections/pregenerated/collections.h'
--- src/runtime/collections/pregenerated/collections.h 2012-03-28 23:58:23 +0000
+++ src/runtime/collections/pregenerated/collections.h 2012-04-13 23:36:23 +0000
@@ -1467,6 +1467,57 @@
1467};1467};
14681468
14691469
1470/**
1471 *
1472 * Returns a sequence of xs:anyURI values representing the document URIs of the
1473 * documents in a collection.
1474 *
1475 * Author: Zorba Team
1476 */
1477class FnURICollectionIteratorState : public PlanIteratorState
1478{
1479public:
1480 store::Iterator_t theIterator; //the current iterator
1481 bool theIteratorOpened; //flag indicating whether theIterator was opened
1482
1483 FnURICollectionIteratorState();
1484
1485 ~FnURICollectionIteratorState();
1486
1487 void init(PlanState&);
1488 void reset(PlanState&);
1489};
1490
1491class FnURICollectionIterator : public NaryBaseIterator<FnURICollectionIterator, FnURICollectionIteratorState>
1492{
1493public:
1494 SERIALIZABLE_CLASS(FnURICollectionIterator);
1495
1496 SERIALIZABLE_CLASS_CONSTRUCTOR2T(FnURICollectionIterator,
1497 NaryBaseIterator<FnURICollectionIterator, FnURICollectionIteratorState>);
1498
1499 void serialize( ::zorba::serialization::Archiver& ar)
1500 {
1501 serialize_baseclass(ar,
1502 (NaryBaseIterator<FnURICollectionIterator, FnURICollectionIteratorState>*)this);
1503 }
1504
1505 FnURICollectionIterator(
1506 static_context* sctx,
1507 const QueryLoc& loc,
1508 std::vector<PlanIter_t>& children)
1509 :
1510 NaryBaseIterator<FnURICollectionIterator, FnURICollectionIteratorState>(sctx, loc, children)
1511 {}
1512
1513 virtual ~FnURICollectionIterator();
1514
1515 void accept(PlanIterVisitor& v) const;
1516
1517 bool nextImpl(store::Item_t& result, PlanState& aPlanState) const;
1518};
1519
1520
1470}1521}
1471#endif1522#endif
1472/*1523/*
14731524
=== modified file 'src/runtime/sequences/pregenerated/sequences.cpp'
--- src/runtime/sequences/pregenerated/sequences.cpp 2012-04-08 21:39:25 +0000
+++ src/runtime/sequences/pregenerated/sequences.cpp 2012-04-13 23:36:23 +0000
@@ -840,6 +840,122 @@
840// </FnDocAvailableIterator>840// </FnDocAvailableIterator>
841841
842842
843// <FnAvailableEnvironmentVariablesIterator>
844FnAvailableEnvironmentVariablesIterator::class_factory<FnAvailableEnvironmentVariablesIterator>
845FnAvailableEnvironmentVariablesIterator::g_class_factory;
846
847
848void FnAvailableEnvironmentVariablesIterator::accept(PlanIterVisitor& v) const {
849 v.beginVisit(*this);
850
851 std::vector<PlanIter_t>::const_iterator lIter = theChildren.begin();
852 std::vector<PlanIter_t>::const_iterator lEnd = theChildren.end();
853 for ( ; lIter != lEnd; ++lIter ){
854 (*lIter)->accept(v);
855 }
856
857 v.endVisit(*this);
858}
859
860FnAvailableEnvironmentVariablesIterator::~FnAvailableEnvironmentVariablesIterator() {}
861
862FnAvailableEnvironmentVariablesIteratorState::FnAvailableEnvironmentVariablesIteratorState() {}
863
864FnAvailableEnvironmentVariablesIteratorState::~FnAvailableEnvironmentVariablesIteratorState() {}
865
866// </FnAvailableEnvironmentVariablesIterator>
867
868
869// <FnEnvironmentVariableIterator>
870FnEnvironmentVariableIterator::class_factory<FnEnvironmentVariableIterator>
871FnEnvironmentVariableIterator::g_class_factory;
872
873
874void FnEnvironmentVariableIterator::accept(PlanIterVisitor& v) const {
875 v.beginVisit(*this);
876
877 std::vector<PlanIter_t>::const_iterator lIter = theChildren.begin();
878 std::vector<PlanIter_t>::const_iterator lEnd = theChildren.end();
879 for ( ; lIter != lEnd; ++lIter ){
880 (*lIter)->accept(v);
881 }
882
883 v.endVisit(*this);
884}
885
886FnEnvironmentVariableIterator::~FnEnvironmentVariableIterator() {}
887
888// </FnEnvironmentVariableIterator>
889
890
891// <FnUnparsedTextIterator>
892FnUnparsedTextIterator::class_factory<FnUnparsedTextIterator>
893FnUnparsedTextIterator::g_class_factory;
894
895
896void FnUnparsedTextIterator::accept(PlanIterVisitor& v) const {
897 v.beginVisit(*this);
898
899 std::vector<PlanIter_t>::const_iterator lIter = theChildren.begin();
900 std::vector<PlanIter_t>::const_iterator lEnd = theChildren.end();
901 for ( ; lIter != lEnd; ++lIter ){
902 (*lIter)->accept(v);
903 }
904
905 v.endVisit(*this);
906}
907
908FnUnparsedTextIterator::~FnUnparsedTextIterator() {}
909
910// </FnUnparsedTextIterator>
911
912
913// <FnUnparsedTextAvailableIterator>
914FnUnparsedTextAvailableIterator::class_factory<FnUnparsedTextAvailableIterator>
915FnUnparsedTextAvailableIterator::g_class_factory;
916
917
918void FnUnparsedTextAvailableIterator::accept(PlanIterVisitor& v) const {
919 v.beginVisit(*this);
920
921 std::vector<PlanIter_t>::const_iterator lIter = theChildren.begin();
922 std::vector<PlanIter_t>::const_iterator lEnd = theChildren.end();
923 for ( ; lIter != lEnd; ++lIter ){
924 (*lIter)->accept(v);
925 }
926
927 v.endVisit(*this);
928}
929
930FnUnparsedTextAvailableIterator::~FnUnparsedTextAvailableIterator() {}
931
932// </FnUnparsedTextAvailableIterator>
933
934
935// <FnUnparsedTextLinesIterator>
936FnUnparsedTextLinesIterator::class_factory<FnUnparsedTextLinesIterator>
937FnUnparsedTextLinesIterator::g_class_factory;
938
939
940void FnUnparsedTextLinesIterator::accept(PlanIterVisitor& v) const {
941 v.beginVisit(*this);
942
943 std::vector<PlanIter_t>::const_iterator lIter = theChildren.begin();
944 std::vector<PlanIter_t>::const_iterator lEnd = theChildren.end();
945 for ( ; lIter != lEnd; ++lIter ){
946 (*lIter)->accept(v);
947 }
948
949 v.endVisit(*this);
950}
951
952FnUnparsedTextLinesIterator::~FnUnparsedTextLinesIterator() {}
953
954FnUnparsedTextLinesIteratorState::FnUnparsedTextLinesIteratorState() {}
955
956// </FnUnparsedTextLinesIterator>
957
958
843959
844}960}
845961
846962
=== modified file 'src/runtime/sequences/pregenerated/sequences.h'
--- src/runtime/sequences/pregenerated/sequences.h 2012-03-28 05:19:57 +0000
+++ src/runtime/sequences/pregenerated/sequences.h 2012-04-13 23:36:23 +0000
@@ -1394,6 +1394,225 @@
1394};1394};
13951395
13961396
1397/**
1398 *
1399 * Summary: returns a list of environment variable names that are suitable for
1400 * passing to fn:environment-variable, as a (possible empty) sequence of
1401 * strings.
1402 *
1403 * The function returns a sequence of strings, being the names of the environment
1404 * variables in the dynamic context in some implementation-defined order.
1405 *
1406 * Author: Zorba Team
1407 */
1408class FnAvailableEnvironmentVariablesIteratorState : public PlanIteratorState
1409{
1410public:
1411 store::Iterator_t theIterator; //the current iterator
1412
1413 FnAvailableEnvironmentVariablesIteratorState();
1414
1415 ~FnAvailableEnvironmentVariablesIteratorState();
1416
1417 void init(PlanState&);
1418 void reset(PlanState&);
1419};
1420
1421class FnAvailableEnvironmentVariablesIterator : public NaryBaseIterator<FnAvailableEnvironmentVariablesIterator, FnAvailableEnvironmentVariablesIteratorState>
1422{
1423public:
1424 SERIALIZABLE_CLASS(FnAvailableEnvironmentVariablesIterator);
1425
1426 SERIALIZABLE_CLASS_CONSTRUCTOR2T(FnAvailableEnvironmentVariablesIterator,
1427 NaryBaseIterator<FnAvailableEnvironmentVariablesIterator, FnAvailableEnvironmentVariablesIteratorState>);
1428
1429 void serialize( ::zorba::serialization::Archiver& ar)
1430 {
1431 serialize_baseclass(ar,
1432 (NaryBaseIterator<FnAvailableEnvironmentVariablesIterator, FnAvailableEnvironmentVariablesIteratorState>*)this);
1433 }
1434
1435 FnAvailableEnvironmentVariablesIterator(
1436 static_context* sctx,
1437 const QueryLoc& loc,
1438 std::vector<PlanIter_t>& children)
1439 :
1440 NaryBaseIterator<FnAvailableEnvironmentVariablesIterator, FnAvailableEnvironmentVariablesIteratorState>(sctx, loc, children)
1441 {}
1442
1443 virtual ~FnAvailableEnvironmentVariablesIterator();
1444
1445 void accept(PlanIterVisitor& v) const;
1446
1447 bool nextImpl(store::Item_t& result, PlanState& aPlanState) const;
1448};
1449
1450
1451/**
1452 *
1453 * Summary: Returns the value of a system environment variable, if it exists.
1454 *
1455 * If there is no environment variable with a matching name, the function returns
1456 * the empty sequence.
1457 *
1458 * Author: Zorba Team
1459 */
1460class FnEnvironmentVariableIterator : public NaryBaseIterator<FnEnvironmentVariableIterator, PlanIteratorState>
1461{
1462public:
1463 SERIALIZABLE_CLASS(FnEnvironmentVariableIterator);
1464
1465 SERIALIZABLE_CLASS_CONSTRUCTOR2T(FnEnvironmentVariableIterator,
1466 NaryBaseIterator<FnEnvironmentVariableIterator, PlanIteratorState>);
1467
1468 void serialize( ::zorba::serialization::Archiver& ar)
1469 {
1470 serialize_baseclass(ar,
1471 (NaryBaseIterator<FnEnvironmentVariableIterator, PlanIteratorState>*)this);
1472 }
1473
1474 FnEnvironmentVariableIterator(
1475 static_context* sctx,
1476 const QueryLoc& loc,
1477 std::vector<PlanIter_t>& children)
1478 :
1479 NaryBaseIterator<FnEnvironmentVariableIterator, PlanIteratorState>(sctx, loc, children)
1480 {}
1481
1482 virtual ~FnEnvironmentVariableIterator();
1483
1484 void accept(PlanIterVisitor& v) const;
1485
1486 bool nextImpl(store::Item_t& result, PlanState& aPlanState) const;
1487};
1488
1489
1490/**
1491 *
1492 * Summary: The fn:unparsed-text function reads an external resource (for
1493 * example, a file) and returns its contents as a string.
1494 *
1495 * Author: Zorba Team
1496 */
1497class FnUnparsedTextIterator : public NaryBaseIterator<FnUnparsedTextIterator, PlanIteratorState>
1498{
1499public:
1500 SERIALIZABLE_CLASS(FnUnparsedTextIterator);
1501
1502 SERIALIZABLE_CLASS_CONSTRUCTOR2T(FnUnparsedTextIterator,
1503 NaryBaseIterator<FnUnparsedTextIterator, PlanIteratorState>);
1504
1505 void serialize( ::zorba::serialization::Archiver& ar)
1506 {
1507 serialize_baseclass(ar,
1508 (NaryBaseIterator<FnUnparsedTextIterator, PlanIteratorState>*)this);
1509 }
1510
1511 FnUnparsedTextIterator(
1512 static_context* sctx,
1513 const QueryLoc& loc,
1514 std::vector<PlanIter_t>& children)
1515 :
1516 NaryBaseIterator<FnUnparsedTextIterator, PlanIteratorState>(sctx, loc, children)
1517 {}
1518
1519 virtual ~FnUnparsedTextIterator();
1520
1521 void accept(PlanIterVisitor& v) const;
1522
1523 bool nextImpl(store::Item_t& result, PlanState& aPlanState) const;
1524};
1525
1526
1527/**
1528 *
1529 * Because errors in evaluating the fn:unparsed-text function are
1530 * non-recoverable, these two functions are provided to allow an application
1531 * to determine whether a call with particular arguments would succeed.
1532 *
1533 * Author: Zorba Team
1534 */
1535class FnUnparsedTextAvailableIterator : public NaryBaseIterator<FnUnparsedTextAvailableIterator, PlanIteratorState>
1536{
1537public:
1538 SERIALIZABLE_CLASS(FnUnparsedTextAvailableIterator);
1539
1540 SERIALIZABLE_CLASS_CONSTRUCTOR2T(FnUnparsedTextAvailableIterator,
1541 NaryBaseIterator<FnUnparsedTextAvailableIterator, PlanIteratorState>);
1542
1543 void serialize( ::zorba::serialization::Archiver& ar)
1544 {
1545 serialize_baseclass(ar,
1546 (NaryBaseIterator<FnUnparsedTextAvailableIterator, PlanIteratorState>*)this);
1547 }
1548
1549 FnUnparsedTextAvailableIterator(
1550 static_context* sctx,
1551 const QueryLoc& loc,
1552 std::vector<PlanIter_t>& children)
1553 :
1554 NaryBaseIterator<FnUnparsedTextAvailableIterator, PlanIteratorState>(sctx, loc, children)
1555 {}
1556
1557 virtual ~FnUnparsedTextAvailableIterator();
1558
1559 void accept(PlanIterVisitor& v) const;
1560
1561 bool nextImpl(store::Item_t& result, PlanState& aPlanState) const;
1562};
1563
1564
1565/**
1566 *
1567 * Reads an external resource and returns its contents as a sequence of strings,
1568 * separated at newline boundaries.
1569 *
1570 * Author: Zorba Team
1571 */
1572class FnUnparsedTextLinesIteratorState : public PlanIteratorState
1573{
1574public:
1575 std::unique_ptr<std::istream, StreamReleaser>* theStream; //the current stream
1576 internal::StreamResource* theStreamResource; //the current iterator
1577
1578 FnUnparsedTextLinesIteratorState();
1579
1580 ~FnUnparsedTextLinesIteratorState();
1581
1582 void init(PlanState&);
1583 void reset(PlanState&);
1584};
1585
1586class FnUnparsedTextLinesIterator : public NaryBaseIterator<FnUnparsedTextLinesIterator, FnUnparsedTextLinesIteratorState>
1587{
1588public:
1589 SERIALIZABLE_CLASS(FnUnparsedTextLinesIterator);
1590
1591 SERIALIZABLE_CLASS_CONSTRUCTOR2T(FnUnparsedTextLinesIterator,
1592 NaryBaseIterator<FnUnparsedTextLinesIterator, FnUnparsedTextLinesIteratorState>);
1593
1594 void serialize( ::zorba::serialization::Archiver& ar)
1595 {
1596 serialize_baseclass(ar,
1597 (NaryBaseIterator<FnUnparsedTextLinesIterator, FnUnparsedTextLinesIteratorState>*)this);
1598 }
1599
1600 FnUnparsedTextLinesIterator(
1601 static_context* sctx,
1602 const QueryLoc& loc,
1603 std::vector<PlanIter_t>& children)
1604 :
1605 NaryBaseIterator<FnUnparsedTextLinesIterator, FnUnparsedTextLinesIteratorState>(sctx, loc, children)
1606 {}
1607
1608 virtual ~FnUnparsedTextLinesIterator();
1609
1610 void accept(PlanIterVisitor& v) const;
1611
1612 bool nextImpl(store::Item_t& result, PlanState& aPlanState) const;
1613};
1614
1615
1397}1616}
1398#endif1617#endif
1399/*1618/*
14001619
=== modified file 'src/runtime/sequences/sequences_impl.cpp'
--- src/runtime/sequences/sequences_impl.cpp 2012-03-28 05:19:57 +0000
+++ src/runtime/sequences/sequences_impl.cpp 2012-04-13 23:36:23 +0000
@@ -30,6 +30,8 @@
30// For timing30// For timing
31#include <zorba/util/time.h>31#include <zorba/util/time.h>
3232
33#include <zorba/transcode_stream.h>
34
33#include <util/fs_util.h>35#include <util/fs_util.h>
34#include <util/uri_util.h>36#include <util/uri_util.h>
3537
@@ -50,6 +52,7 @@
50#include <store/api/store.h>52#include <store/api/store.h>
51#include <store/api/iterator.h>53#include <store/api/iterator.h>
52#include <store/api/item_factory.h>54#include <store/api/item_factory.h>
55#include "store/api/temp_seq.h"
53#include <store/api/pul.h>56#include <store/api/pul.h>
54#include <store/util/hashset_node_handle.h>57#include <store/util/hashset_node_handle.h>
5558
@@ -1925,5 +1928,274 @@
1925 STACK_END (state);1928 STACK_END (state);
1926}1929}
19271930
1931
1932/*******************************************************************************
1933 14.8.8 fn:environment-variable
1934********************************************************************************/
1935bool FnEnvironmentVariableIterator::nextImpl(store::Item_t& result, PlanState& planState) const
1936{
1937 store::Item_t item;
1938 zstring varname;
1939
1940 PlanIteratorState* state;
1941 DEFAULT_STACK_INIT(PlanIteratorState, state, planState);
1942
1943 consumeNext(item, theChildren[0].getp(),planState);
1944
1945 item->getStringValue2(varname);
1946 result = planState.theLocalDynCtx->get_environment_variable(varname);
1947 STACK_PUSH(result!=NULL, state);
1948
1949 STACK_END(state);
1950}
1951
1952/*******************************************************************************
1953 14.8.9 fn:available-environment-variables
1954********************************************************************************/
1955bool FnAvailableEnvironmentVariablesIterator::nextImpl(store::Item_t& result, PlanState& planState) const
1956{
1957 store::Iterator_t lIte;
1958 FnAvailableEnvironmentVariablesIteratorState* state;
1959 DEFAULT_STACK_INIT(FnAvailableEnvironmentVariablesIteratorState, state, planState);
1960
1961 state->theIterator = planState.theLocalDynCtx->available_environment_variables();
1962
1963 state->theIterator->open();
1964 while (state->theIterator->next(result))
1965 {
1966 STACK_PUSH(true, state);
1967 }
1968 state->theIterator->close();
1969 STACK_END(state);
1970}
1971
1972void FnAvailableEnvironmentVariablesIteratorState::init(PlanState& planState)
1973{
1974 PlanIteratorState::init(planState);
1975 theIterator = 0;
1976}
1977
1978void FnAvailableEnvironmentVariablesIteratorState::reset(PlanState& planState)
1979{
1980 PlanIteratorState::reset(planState);
1981 theIterator = 0;
1982}
1983
1984/*******************************************************************************
1985 14.8.5 fn:unparsed-text
1986********************************************************************************/
1987/**
1988 * Utility method for fn:unparsed-text() and fn:unparsed-text-available().
1989 */
1990static void readDocument(
1991 zstring const& aUri,
1992 zstring const& aEncoding,
1993 static_context* aSctx,
1994 PlanState& aPlanState,
1995 QueryLoc const& loc,
1996 store::Item_t& oResult)
1997{
1998 //Normalize input to handle filesystem paths, etc.
1999 zstring const lNormUri(normalizeInput(aUri, aSctx, loc));
2000
2001 //Resolve URI to stream
2002 zstring lErrorMessage;
2003 std::auto_ptr<internal::Resource> lResource = aSctx->resolve_uri
2004 (lNormUri, internal::EntityData::SOME_CONTENT, lErrorMessage);
2005
2006 internal::StreamResource* lStreamResource =
2007 dynamic_cast<internal::StreamResource*>(lResource.get());
2008
2009 if (lStreamResource == NULL)
2010 {
2011 throw XQUERY_EXCEPTION(err::FOUT1170, ERROR_PARAMS(aUri), ERROR_LOC(loc));
2012 }
2013 StreamReleaser lStreamReleaser = lStreamResource->getStreamReleaser();
2014 std::unique_ptr<std::istream, StreamReleaser> lStream(lStreamResource->getStream(), lStreamReleaser);
2015
2016 lStreamResource->setStreamReleaser(nullptr);
2017
2018 //check if encoding is needed
2019 if (transcode::is_necessary(aEncoding.c_str()))
2020 {
2021 if (!transcode::is_supported(aEncoding.c_str()))
2022 {
2023 throw XQUERY_EXCEPTION(err::FOUT1190, ERROR_PARAMS(aUri), ERROR_LOC(loc));
2024 }
2025 transcode::attach(*lStream.get(), aEncoding.c_str());
2026 }
2027 //creates stream item
2028 GENV_ITEMFACTORY->createStreamableString(
2029 oResult,
2030 *lStream.release(),
2031 lStream.get_deleter()
2032 );
2033
2034 if (oResult.isNull())
2035 {
2036 throw XQUERY_EXCEPTION(err::FOUT1170, ERROR_PARAMS(aUri), ERROR_LOC(loc));
2037 }
2038}
2039
2040bool FnUnparsedTextIterator::nextImpl(store::Item_t& result, PlanState& planState) const
2041{
2042 store::Item_t uriItem;
2043 store::Item_t encodingItem;
2044 zstring uriString;
2045 zstring encodingString("UTF-8");
2046
2047 PlanIteratorState* state;
2048 DEFAULT_STACK_INIT(PlanIteratorState, state, planState);
2049
2050 if (!consumeNext(uriItem, theChildren[0].getp(), planState))
2051 {
2052 STACK_PUSH(false, state);
2053 }
2054
2055 if (theChildren.size() == 2)
2056 {
2057 consumeNext(encodingItem, theChildren[1].getp(), planState);
2058 encodingItem->getStringValue2(encodingString);
2059 }
2060
2061 uriItem->getStringValue2(uriString);
2062 readDocument(uriString, encodingString, theSctx, planState, loc, result);
2063 STACK_PUSH(true, state);
2064
2065 STACK_END(state);
2066}
2067
2068
2069/*******************************************************************************
2070 14.8.7 fn:unparsed-text-available
2071********************************************************************************/
2072
2073bool FnUnparsedTextAvailableIterator::nextImpl(store::Item_t& result, PlanState& planState) const
2074{
2075 store::Item_t unparsedText;
2076 store::Item_t uriItem;
2077 store::Item_t encodingItem;
2078 zstring uriString;
2079 zstring encodingString("UTF-8");
2080
2081 PlanIteratorState* state;
2082 DEFAULT_STACK_INIT(PlanIteratorState, state, planState);
2083
2084 if (!consumeNext(uriItem, theChildren[0].getp(), planState))
2085 {
2086 STACK_PUSH(GENV_ITEMFACTORY->createBoolean(result, false), state);
2087 }
2088
2089 if (theChildren.size() == 2)
2090 {
2091 consumeNext(encodingItem, theChildren[1].getp(), planState);
2092 encodingItem->getStringValue2(encodingString);
2093 }
2094
2095 uriItem->getStringValue2(uriString);
2096
2097 try
2098 {
2099 readDocument(uriString, encodingString, theSctx, planState, loc, unparsedText);
2100 }
2101 catch (XQueryException const& e)
2102 {
2103 unparsedText = NULL;
2104 }
2105
2106 STACK_PUSH(GENV_ITEMFACTORY->createBoolean(result, !(unparsedText.isNull()) ), state);
2107
2108 STACK_END(state);
2109}
2110
2111/*******************************************************************************
2112 14.8.6 fn:unparsed-text-lines
2113********************************************************************************/
2114FnUnparsedTextLinesIteratorState::~FnUnparsedTextLinesIteratorState()
2115{
2116 delete theStream;
2117 theStream = 0;
2118 theStreamResource = 0;
2119}
2120
2121bool FnUnparsedTextLinesIterator::nextImpl(store::Item_t& result, PlanState& planState) const
2122{
2123 store::Item_t uriItem;
2124 store::Item_t encodingItem;
2125 store::Item_t streamItem;
2126 zstring streamLine;
2127 zstring uriString;
2128 zstring encodingString("UTF-8");
2129 zstring lNormUri;
2130 zstring lErrorMessage;
2131 std::auto_ptr<internal::Resource> lResource;
2132 StreamReleaser lStreamReleaser;
2133
2134 FnUnparsedTextLinesIteratorState* state;
2135 DEFAULT_STACK_INIT(FnUnparsedTextLinesIteratorState, state, planState);
2136
2137 if (!consumeNext(uriItem, theChildren[0].getp(), planState))
2138 {
2139 STACK_PUSH(false, state);
2140 }
2141
2142 if (theChildren.size() == 2)
2143 {
2144 consumeNext(encodingItem, theChildren[1].getp(), planState);
2145 encodingItem->getStringValue2(encodingString);
2146 }
2147
2148 //Normalize input to handle filesystem paths, etc.
2149 uriItem->getStringValue2(uriString);
2150 lNormUri = normalizeInput(uriString, theSctx, loc);
2151
2152 //Resolve URI to stream
2153 lResource = theSctx->resolve_uri
2154 (lNormUri, internal::EntityData::SOME_CONTENT, lErrorMessage);
2155
2156 state->theStreamResource =
2157 dynamic_cast<internal::StreamResource*>(lResource.get());
2158
2159 if (state->theStreamResource == NULL)
2160 throw XQUERY_EXCEPTION(err::FOUT1170, ERROR_PARAMS(uriString), ERROR_LOC(loc));
2161
2162 lStreamReleaser = state->theStreamResource->getStreamReleaser();
2163 state->theStream = new std::unique_ptr<std::istream, StreamReleaser> (state->theStreamResource->getStream(), lStreamReleaser);
2164 state->theStreamResource->setStreamReleaser(nullptr);
2165
2166 //check if encoding is needed
2167 if (transcode::is_necessary(encodingString.c_str()))
2168 {
2169 if (!transcode::is_supported(encodingString.c_str()))
2170 {
2171 throw XQUERY_EXCEPTION(err::FOUT1190, ERROR_PARAMS(uriString), ERROR_LOC(loc));
2172 }
2173 transcode::attach(*state->theStream->get(), encodingString.c_str());
2174 }
2175
2176 while (state->theStream->get()->good())
2177 {
2178 getline(*state->theStream->get(), streamLine);
2179 STACK_PUSH(GENV_ITEMFACTORY->createString(result, streamLine), state);
2180 }
2181
2182 STACK_END(state);
2183}
2184
2185void FnUnparsedTextLinesIteratorState::init(PlanState& planState)
2186{
2187 PlanIteratorState::init(planState);
2188 theStreamResource = 0;
2189 theStream = 0;
2190}
2191
2192void FnUnparsedTextLinesIteratorState::reset(PlanState& planState)
2193{
2194 PlanIteratorState::reset(planState);
2195 delete theStream;
2196 theStream = 0;
2197 theStreamResource = 0;
2198}
2199
1928} // namespace zorba2200} // namespace zorba
1929/* vim:set et sw=2 ts=2: */2201/* vim:set et sw=2 ts=2: */
19302202
=== modified file 'src/runtime/spec/collections/collections.xml'
--- src/runtime/spec/collections/collections.xml 2012-03-28 05:19:57 +0000
+++ src/runtime/spec/collections/collections.xml 2012-04-13 23:36:23 +0000
@@ -1319,4 +1319,37 @@
1319 </zorba:state>1319 </zorba:state>
1320</zorba:iterator>1320</zorba:iterator>
13211321
1322<!--
1323/*******************************************************************************
132414.8.5 fn:uri-collection
1325********************************************************************************/
1326-->
1327 <zorba:iterator name="FnURICollectionIterator">
1328 <zorba:description author="Zorba Team">
1329 Returns a sequence of xs:anyURI values representing the document URIs of the
1330 documents in a collection.
1331 </zorba:description>
1332
1333 <zorba:function>
1334
1335 <zorba:signature localname="uri-collection" prefix="fn" version="3.0">
1336 <zorba:output>xs:anyURI*</zorba:output>
1337 </zorba:signature>
1338
1339 <zorba:signature localname="uri-collection" prefix="fn" version="3.0">
1340 <zorba:param>xs:string?</zorba:param>
1341 <zorba:output>xs:anyURI*</zorba:output>
1342 </zorba:signature>
1343
1344 </zorba:function>
1345
1346 <zorba:state generateInit="false" generateReset="false" generateDestructor="false">
1347 <zorba:member type="store::Iterator_t" name="theIterator"
1348 brief="the current iterator"/>
1349 <zorba:member type="bool" name="theIteratorOpened" defaultValue="false"
1350 brief="flag indicating whether theIterator was opened"/>
1351 </zorba:state>
1352
1353 </zorba:iterator>
1354
1322</zorba:iterators>1355</zorba:iterators>
13231356
=== modified file 'src/runtime/spec/sequences/sequences.xml'
--- src/runtime/spec/sequences/sequences.xml 2012-03-28 05:19:57 +0000
+++ src/runtime/spec/sequences/sequences.xml 2012-04-13 23:36:23 +0000
@@ -1144,4 +1144,175 @@
11441144
1145</zorba:iterator>1145</zorba:iterator>
11461146
1147<!--
1148/*******************************************************************************
1149 14.8.9 fn:available-environment-variables
1150********************************************************************************/
1151-->
1152
1153<zorba:iterator name="FnAvailableEnvironmentVariablesIterator">
1154 <zorba:description author="Zorba Team">
1155 Summary: returns a list of environment variable names that are suitable for
1156 passing to fn:environment-variable, as a (possible empty) sequence of
1157 strings.
1158
1159 The function returns a sequence of strings, being the names of the environment
1160 variables in the dynamic context in some implementation-defined order.
1161 </zorba:description>
1162
1163 <zorba:function>
1164 <zorba:signature localname="available-environment-variables" prefix="fn" version="3.0">
1165 <zorba:output>xs:string*</zorba:output>
1166 </zorba:signature>
1167
1168 </zorba:function>
1169
1170 <zorba:state generateInit="false" generateReset="false">
1171 <zorba:member type="store::Iterator_t" name="theIterator"
1172 brief="the current iterator"/>
1173 </zorba:state>
1174
1175 <zorba:methods>
1176 <zorba:accessesDynCtx returnValue="true"/>
1177 </zorba:methods>
1178
1179</zorba:iterator>
1180
1181<!--
1182/*******************************************************************************
118314.8.8 fn:environment-variable
1184********************************************************************************/
1185-->
1186
1187<zorba:iterator name="FnEnvironmentVariableIterator">
1188 <zorba:description author="Zorba Team">
1189 Summary: Returns the value of a system environment variable, if it exists.
1190
1191 If there is no environment variable with a matching name, the function returns
1192 the empty sequence.
1193 </zorba:description>
1194
1195 <zorba:function>
1196 <zorba:signature localname="environment-variable" prefix="fn" version="3.0">
1197 <zorba:param>xs:string</zorba:param>
1198 <zorba:output>xs:string?</zorba:output>
1199 </zorba:signature>
1200 </zorba:function>
1201
1202 <zorba:methods>
1203 <zorba:accessesDynCtx returnValue="true"/>
1204 </zorba:methods>
1205
1206</zorba:iterator>
1207
1208<!--
1209/*******************************************************************************
121014.8.5 fn:unparsed-text
1211********************************************************************************/
1212-->
1213
1214<zorba:iterator name="FnUnparsedTextIterator">
1215 <zorba:description author="Zorba Team">
1216 Summary: The fn:unparsed-text function reads an external resource (for
1217 example, a file) and returns its contents as a string.
1218 </zorba:description>
1219
1220 <zorba:function>
1221
1222 <zorba:signature localname="unparsed-text" prefix="fn" version="3.0">
1223 <zorba:param>xs:string?</zorba:param>
1224 <zorba:output>xs:string?</zorba:output>
1225 </zorba:signature>
1226
1227 <zorba:signature localname="unparsed-text" prefix="fn" version="3.0">
1228 <zorba:param>xs:string?</zorba:param>
1229 <zorba:param>xs:string</zorba:param>
1230 <zorba:output>xs:string?</zorba:output>
1231 </zorba:signature>
1232 </zorba:function>
1233
1234 <zorba:methods>
1235 <zorba:accessesDynCtx returnValue="true"/>
1236 <zorba:isSource returnValue="true"/>
1237 </zorba:methods>
1238
1239</zorba:iterator>
1240
1241<!--
1242/*******************************************************************************
124314.8.5 fn:unparsed-text
1244********************************************************************************/
1245-->
1246
1247<zorba:iterator name="FnUnparsedTextAvailableIterator">
1248 <zorba:description author="Zorba Team">
1249 Because errors in evaluating the fn:unparsed-text function are
1250 non-recoverable, these two functions are provided to allow an application
1251 to determine whether a call with particular arguments would succeed.