← Back to team overview

zorba-coders team mailing list archive

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

 

Matthias Brantner has proposed merging lp:~zorba-coders/zorba/fn_envvars into lp:zorba.

Requested reviews:
  Matthias Brantner (matthias-brantner)
  Sorin Marian Nasoi (sorin.marian.nasoi)
Related bugs:
  Bug #930157 in Zorba: "fn:available-environment-variables Implementation"
  https://bugs.launchpad.net/zorba/+bug/930157
  Bug #930158 in Zorba: "fn:environment-variables Implementation"
  https://bugs.launchpad.net/zorba/+bug/930158
  Bug #930160 in Zorba: "fn:uri-collection Implementation"
  https://bugs.launchpad.net/zorba/+bug/930160
  Bug #930161 in Zorba: "fn:unparsed-text Implementation"
  https://bugs.launchpad.net/zorba/+bug/930161
  Bug #930162 in Zorba: "fn:unparsed-text-available Implementation"
  https://bugs.launchpad.net/zorba/+bug/930162

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/fn_envvars/+merge/101880

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

-- 
The attached diff has been truncated due to its size.
https://code.launchpad.net/~zorba-coders/zorba/fn_envvars/+merge/101880
Your team Zorba Coders is subscribed to branch lp:zorba.
=== modified file 'ChangeLog'
--- ChangeLog	2012-04-12 09:32:55 +0000
+++ ChangeLog	2012-04-13 09:35:12 +0000
@@ -3,6 +3,11 @@
 version 2.5
 
 New Features:
+  * fn:available-environment-variables
+  * fn:environment-variables
+  * fn:uri-collection
+  * fn:unparsed-text
+  * fn:unparsed-text-available
   * Extended API for Python, Java, PHP and Ruby.
 
 Optimization:

=== added file 'NOTICE.txt'
--- NOTICE.txt	1970-01-01 00:00:00 +0000
+++ NOTICE.txt	2012-04-13 09:35:12 +0000
@@ -0,0 +1,740 @@
+-----------
+Zorba 2.2.0
+-----------
+
+(Note: This file is generated automatically from NOTICE.xml.
+Please do not modify this file directly.)
+
+
+
+
+Apache 2
+
+      Copyright 2006-2011 The FLWOR Foundation
+
+      See LICENSE.txt for license information.
+
+      ------------------------
+      This product includes software developed at
+      The FLWOR Foundation (http://www.flworfound.org/).
+
+      ------------------------
+      Portions of this software were developed at the Systems
+      Group of the ETH Zurich, Switzerland.
+    
+
+Other files used by this project:
+----------------------------------------------------
+
+src/zorbatypes/m_apm.h
+src/zorbatypes/mapm/
+
+Copyright: 1999-2007 Michael C. Ring
+Website: http://www.tc.umn.edu/~ringx004/mapm-main.html
+
+      This software is Freeware.
+
+      Permission to use, copy, and distribute this software and its
+      documentation for any purpose with or without fee is hereby granted,
+      provided that the above copyright notice appear in all copies and
+      that both that copyright notice and this permission notice appear
+      in supporting documentation.
+
+      Permission to modify the software is granted. Permission to distribute
+      the modified code is granted. Modifications are to be distributed by
+      using the file 'license.txt' as a template to modify the file header.
+      'license.txt' is available in the official MAPM distribution.
+
+      To distribute modified source code, insert the file 'license.txt'
+      at the top of all modified source code files and edit accordingly.
+
+      This software is provided "as is" without express or implied warranty.
+    
+----------------------------------------------------
+
+src/zorbamisc/config/stdint.h
+
+Copyright: 2006 Alexander Chemeris
+
+
+      Redistribution and use in source and binary forms, with or without
+      modification, are permitted provided that the following conditions are met:
+
+      1. Redistributions of source code must retain the above copyright notice,
+      this list of conditions and the following disclaimer.
+
+      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.
+
+      3. The name of the author may be used to endorse or promote products
+      derived from this software without specific prior written permission.
+
+      THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
+    
+----------------------------------------------------
+
+src/zorbautils/stemmer/
+
+Copyright: 2001 Dr. Martin Porter
+
+
+      All the software given out on this Snowball site is covered by the BSD
+      License (see http://www.opensource.org/licenses/bsd-license.html), with
+      Copyright (c) 2001, Dr Martin Porter, and (for the Java developments)
+      Copyright (c) 2002, Richard Boulton.
+
+      Essentially, all this means is that you can do what you like with the code,
+      except claim another Copyright for it, or claim that it is issued under a
+      different license. The software is also issued without warranties, which
+      means that if anyone suffers through its use, they cannot come back and sue
+      you. You also have to alert anyone to whom you give the Snowball software to
+      the fact that it is covered by the BSD license.
+
+      We have not bothered to insert the licensing arrangement into the text of
+      the Snowball software.
+    
+----------------------------------------------------
+
+src/util/less.h
+
+Copyright: 1998 Paul J. Lucas
+
+
+      Redistribution and use in source and binary forms, with or without
+      modification, are permitted provided that the following conditions are met:
+
+      o  Redistributions of source code must retain the above copyright notice,
+      this list of conditions and the following disclaimer.
+
+      o  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.
+
+      o  The name of the author may not be used to endorse or promote products
+      derived from this software without specific prior written permission.
+
+      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.
+    
+----------------------------------------------------
+
+src/util/auto_vector.h (has been modified)
+
+Copyright: 2003 Reliable Software
+
+
+      Redistribution and use in source and binary forms, with or without
+      modification, are permitted provided that the following conditions are met:
+
+      o  Redistributions of source code must retain the above copyright notice,
+      this list of conditions and the following disclaimer.
+
+      o  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.
+
+      o  The name of the author may not be used to endorse or promote products
+      derived from this software without specific prior written permission.
+
+      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.
+    
+----------------------------------------------------
+
+cmake_modules/FindBoost.cmake
+
+Copyright: 
+      2006-2008 Andreas Schneider <mail@xxxxxxxxxxxx>
+      2007      Wengo
+      2007      Mike Jackson
+      2008      Andreas Pakulat <apaku@xxxxxx>
+    
+
+
+      Redistribution AND use is allowed according to the terms of the New BSD license.
+      For details see the accompanying COPYING-CMAKE-SCRIPTS file.
+    
+----------------------------------------------------
+
+cmake_modules/FindJNI.cmake
+cmake_modules/FindPythonLibs.cmake
+cmake_modules/FindSWIG.cmake
+
+Copyright: 2001-2009 Kitware, Inc.
+
+
+      Distributed under the OSI-approved BSD License (the "License");
+      see accompanying file Copyright.txt for details.
+
+      This software is distributed WITHOUT ANY WARRANTY; without even the
+      implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+      See the License for more information.
+
+      CMake - Cross Platform Makefile Generator
+      Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
+      All rights reserved.
+
+      Redistribution and use in source and binary forms, with or without
+      modification, are permitted provided that the following conditions
+      are met:
+
+      * Redistributions of source code must retain the above copyright
+      notice, this list of conditions and the following disclaimer.
+
+      * 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.
+
+      * 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.
+
+      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.
+
+      ------------------------------------------------------------------------------
+
+      The above copyright and license notice applies to distributions of
+      CMake in source and binary form.  Some source files contain additional
+      notices of original copyright by their contributors; see each source
+      for details.  Third-party software packages supplied with CMake under
+      compatible licenses provide their own copyright notices documented in
+      corresponding subdirectories.
+
+      ------------------------------------------------------------------------------
+
+      CMake was initially developed by Kitware with the following sponsorship:
+
+      * National Library of Medicine at the National Institutes of Health
+      as part of the Insight Segmentation and Registration Toolkit (ITK).
+
+      * US National Labs (Los Alamos, Livermore, Sandia) ASC Parallel
+      Visualization Initiative.
+
+      * National Alliance for Medical Image Computing (NAMIC) is funded by the
+      National Institutes of Health through the NIH Roadmap for Medical Research,
+      Grant U54 EB005149.
+
+      * Kitware, Inc.
+    
+----------------------------------------------------
+
+/xml.xsd
+
+Copyright: 2001 World Wide Web Consortium, (Massachusetts Institute of Technology, European Research Consortium for Informatics and Mathematics, Keio University)
+
+
+      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.
+
+      W3C Software Notice and License
+
+      This work (and included software, documentation such as READMEs, or other related items) is being provided by the copyright holders under the following license.
+
+      License
+
+      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.
+
+      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:
+      •The full text of this NOTICE in a location viewable to users of the redistributed or derivative work.
+      •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.
+      •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.)
+
+      Disclaimers
+
+      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.
+
+      COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR DOCUMENTATION.
+
+      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.
+    
+----------------------------------------------------
+
+schemas/xslt-xquery-serialization.xsd
+
+Copyright: 2010 World Wide Web Consortium, (Massachusetts Institute of Technology, European Research Consortium for Informatics and Mathematics, Keio University)
+
+
+      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.
+
+      W3C Software Notice and License
+
+      This work (and included software, documentation such as READMEs, or other related items) is being provided by the copyright holders under the following license.
+
+      License
+
+      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.
+
+      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:
+      •The full text of this NOTICE in a location viewable to users of the redistributed or derivative work.
+      •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.
+      •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.)
+
+      Disclaimers
+
+      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.
+
+      COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR DOCUMENTATION.
+
+      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.
+    
+----------------------------------------------------
+
+modules/w3c/xpath-functions.xsd
+
+Copyright: 2005 World Wide Web Consortium, (Massachusetts Institute of Technology, European Research Consortium for Informatics and Mathematics, Keio University)
+
+
+      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.
+
+      W3C Software Notice and License
+
+      This work (and included software, documentation such as READMEs, or other related items) is being provided by the copyright holders under the following license.
+
+      License
+
+      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.
+
+      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:
+      •The full text of this NOTICE in a location viewable to users of the redistributed or derivative work.
+      •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.
+      •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.)
+
+      Disclaimers
+
+      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.
+
+      COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR DOCUMENTATION.
+
+      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.
+    
+----------------------------------------------------
+
+include/xqc.h
+
+Copyright: 2008, Matthias Brantner, John Snelson
+
+
+      * All rights reserved.
+      *
+      * Redistribution and use in source and binary forms, with or without
+      * modification, are permitted provided that the following conditions are met:
+      *
+      *     * Redistributions of source code must retain the above copyright notice,
+      *       this list of conditions and the following disclaimer.
+      *     * 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.
+      *     * Neither the name of the developers nor the names of contributors may be
+      *       used to endorse or promote products derived from this software without
+      *       specific prior written permission.
+      *
+      * 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 OWNER 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.
+    
+----------------------------------------------------
+
+modules/functx/functx.xq
+
+Copyright: 2007 Datypic
+
+
+      : This library is free software; you can redistribute it and/or
+      : modify it under the terms of the GNU Lesser General Public
+      : License as published by the Free Software Foundation; either
+      : version 2.1 of the License.
+
+      : This library is distributed 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.  See the GNU
+      : Lesser General Public License for more details.
+
+      : You should have received a copy of the GNU Lesser General Public
+      : License along with this library; if not, write to the Free Software
+      : Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+    
+----------------------------------------------------
+
+src/compiler/parser/FlexLexer.h
+
+Copyright: 1993 The Regents of the University of California
+
+
+      // All rights reserved.
+      //
+      // This code is derived from software contributed to Berkeley by
+      // Kent Williams and Tom Epperly.
+      //
+      //  Redistribution and use in source and binary forms, with or without
+      //  modification, are permitted provided that the following conditions
+      //  are met:
+
+      //  1. Redistributions of source code must retain the above copyright
+      //  notice, this list of conditions and the following disclaimer.
+      //  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.
+
+      //  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.
+
+      //  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.
+    
+----------------------------------------------------
+
+src/diagnostics/StackWalker.cpp
+src/diagnostics/StackWalker.h
+
+Copyright: 2005 Jochen Kalmbach 
+
+
+      Under BSD License: http://www.opensource.org/licenses/bsd-license.php
+    
+----------------------------------------------------
+
+src/util/singleton.h
+src/util/threads.h
+
+Copyright: 2001 Andrei Alexandrescu
+
+
+      This code accompanies the book:
+      Alexandrescu, Andrei. "Modern C++ Design: Generic Programming and Design
+          Patterns Applied". Copyright (c) 2001. Addison-Wesley.
+      Permission to use, copy, modify, distribute and sell this software for any
+          purpose is hereby granted without fee, provided that the above copyright
+          notice appear in all copies and that both that copyright notice and this
+          permission notice appear in supporting documentation.
+      The author or Addison-Wesley Longman make no representations about the
+          suitability of this software for any purpose. It is provided "as is"
+          without express or implied warranty.
+    
+
+External libraries used by this project:
+----------------------------------------------------
+
+Name: LIBXML2
+Preferred version: 2.2.16 or higher
+Is mandatory: true
+Website: http://xmlsoft.org/
+License: MIT
+Copyright: 1998-2002 Daniel Veillard.  All Rights Reserved.
+External notice: 
+
+      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:
+
+      The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+      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.
+
+      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 deal-
+      ings in this Software without prior written authorization from him.
+    
+----------------------------------------------------
+
+Name: LIBXSLT
+Preferred version: 1.1.26
+Is mandatory: false
+Website: http://xmlsoft.org/XSLT/
+License: MIT
+Copyright: 2001-2002 Daniel Veillard.  All Rights Reserved.
+External notice: 
+
+      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:
+
+      The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+      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.
+
+
+      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.
+
+    
+----------------------------------------------------
+
+Name: ICU4C
+Preferred version: 3.6 or higher
+Is mandatory: true
+Website: http://www.icu-project.org/
+License: ICU License
+Copyright: 1995-2011 International Business Machines Corporation and others 
+External notice: 
+
+      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.
+
+      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.
+
+      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.
+    
+----------------------------------------------------
+
+Name: CURL
+Preferred version: above 7.12
+Is mandatory: false
+Website: http://curl.haxx.se/
+License: MIT/X derivate license
+Copyright: 1996 - 2011, Daniel Stenberg, <daniel@xxxxxxx>.
+External notice: 
+
+      All rights reserved.
+
+      Permission to use, copy, modify, and distribute this software for any purpose
+      with or without fee is hereby granted, provided that the above copyright
+      notice and this permission notice appear in all copies.
+
+      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 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.
+
+      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.
+    
+----------------------------------------------------
+
+Name: ICONV
+Preferred version: above 1.12
+Is mandatory: true
+Website: http://www.gnu.org/software/libiconv/
+License: LGPL
+Copyright: 1998, 2010 Free Software Foundation, Inc.
+External notice: 
+
+----------------------------------------------------
+
+Name: ZLIB
+Preferred version: 1.2.5
+Is mandatory: true
+Website: http://www.zlib.net/
+Copyright: 1995-2004 Jean-loup Gailly and Mark Adler
+External notice: 
+
+      This software is provided 'as-is', without any express or implied
+      warranty.  In no event will the authors be held liable for any damages
+      arising from the use of this software.
+
+      Permission is granted to anyone to use this software for any purpose,
+      including commercial applications, and to alter it and redistribute it
+      freely, subject to the following restrictions:
+
+      1. The origin of this software must not be misrepresented; you must not
+      claim that you wrote the original software. If you use this software
+      in a product, an acknowledgment in the product documentation would be
+      appreciated but is not required.
+      2. Altered source versions must be plainly marked as such, and must not be
+      misrepresented as being the original software.
+      3. This notice may not be removed or altered from any source distribution.
+
+      Jean-loup Gailly jloup@xxxxxxxx
+      Mark Adler madler@xxxxxxxxxxxxxxxxxx
+    
+----------------------------------------------------
+
+Name: XERCES
+Preferred version: 2.8.0 or higher
+Is mandatory: true
+Website: http://xerces.apache.org/xerces-c/
+License: Apache 2
+Copyright: Copyright © 1999-2010 The Apache Software Foundation. All Rights Reserved.
+External notice: 
+
+      http://www.apache.org/licenses/LICENSE-2.0
+    
+----------------------------------------------------
+
+Name: BOOST (boost_filesystem)
+Preferred version: 1.32 or higher
+Is mandatory: false
+Website: http://www.boost.org/
+License: Boost Software License v1.0
+Copyright: 
+      Beman Dawes, David Abrahams, 1998-2005.
+      Rene Rivera 2004-2007
+    
+External notice: 
+
+      Permission is hereby granted, free of charge, to any person or organization
+      obtaining a copy of the software and accompanying documentation covered by
+      this license (the "Software") to use, reproduce, display, distribute,
+      execute, and transmit the Software, and to prepare derivative works of the
+      Software, and to permit third-parties to whom the Software is furnished to
+      do so, all subject to the following:
+
+      The copyright notices in the Software and this entire statement, including
+      the above license grant, this restriction and the following disclaimer,
+      must be included in all copies of the Software, in whole or in part, and
+      all derivative works of the Software, unless such copies or derivative
+      works are solely in the form of machine-executable object code generated by
+      a source language processor.
+
+      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, TITLE AND NON-INFRINGEMENT. IN NO EVENT
+      SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
+      FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
+      ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+      DEALINGS IN THE SOFTWARE.
+    
+
+External applications used by this project:
+----------------------------------------------------
+
+Name: FLEX
+Preferred version: 2.5.33
+Is mandatory: false
+Website: http://flex.sourceforge.net/
+Copyright: 
+      2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The Flex Project.
+      1990, 1997 The Regents of the University of California. All rights reserved.
+    
+External notice: 
+
+      Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
+
+      1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
+      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.
+      
+      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.
+
+      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.
+    
+----------------------------------------------------
+
+Name: BISON
+Preferred version: 2.4 or higher
+Is mandatory: false
+Website: http://www.gnu.org/software/bison/
+License: GPL
+Copyright: 1998, 2001, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+External notice: 
+
+----------------------------------------------------
+
+Name: DOXYGEN
+Preferred version: v1.7.4 
+Is mandatory: false
+Website: www.doxygen.org
+License: GPL
+Copyright: 1997-2011 by Dimitri van Heesch
+External notice: 
+
+      Permission to use, copy, modify, and distribute this software and its documentation under the terms of the GNU General Public License is hereby granted.
+      No representations are made about the suitability of this software for any purpose. 
+      It is provided "as is" without express or implied warranty. 
+      See the GNU General Public License for more details.
+
+      Documents produced by doxygen are derivative works derived from the input used in their production; they are not affected by this license.
+    
+----------------------------------------------------
+
+Name: CMAKE
+Preferred version: 2.8.4
+Is mandatory: true
+Website: http://www.cmake.org/
+License: Creative Commons Attribution-NoDerivs 3.0 Unported License
+Copyright: 2000-2009 Kitware, Inc., Insight Software Consortium. All rights reserved.
+External notice: 
+
+      Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
+
+      Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
+
+      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.
+
+      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.
+
+      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.
+    
+----------------------------------------------------
+
+Name: SWIG
+Preferred version: 2.0.4 or above
+Is mandatory: false
+Website: http://www.swig.org/
+License: GPL
+Copyright: 
+      1995-2011 The SWIG Developers
+      2005-2006 Arizona Board of Regents (University of Arizona).
+      1998-2005 University of Chicago.
+      1995-1998 The University of Utah and the Regents of the University of California
+    
+External notice: 
+
+      SWIG is free software: you can redistribute it and/or modify it
+      under the terms of the GNU General Public License as published by
+      the Free Software Foundation, either version 3 of the License, or
+      (at your option) any later version. See the LICENSE-GPL file for
+      the full terms of the GNU General Public license version 3.
+
+      Portions of SWIG are also licensed under the terms of the licenses
+      in the file LICENSE-UNIVERSITIES. You must observe the terms of
+      these licenses, as well as the terms of the GNU General Public License,
+      when you distribute SWIG.
+
+      The SWIG library and examples, under the Lib and Examples top level
+      directories, are distributed under the following terms:
+
+      You may copy, modify, distribute, and make derivative works based on
+      this software, in source code or object code form, without
+      restriction. If you distribute the software to others, you may do
+      so according to the terms of your choice. This software is offered as
+      is, without warranty of any kind.
+
+      See the COPYRIGHT file for a list of contributors to SWIG and their
+      copyright notices.
+    
\ No newline at end of file

=== 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 @@
------------
-Zorba 2.2.0
------------
-
-(Note: This file is generated automatically from NOTICE.xml.
-Please do not modify this file directly.)
-
-
-
-
-Apache 2
-
-      Copyright 2006-2011 The FLWOR Foundation
-
-      See LICENSE.txt for license information.
-
-      ------------------------
-      This product includes software developed at
-      The FLWOR Foundation (http://www.flworfound.org/).
-
-      ------------------------
-      Portions of this software were developed at the Systems
-      Group of the ETH Zurich, Switzerland.
-    
-
-Other files used by this project:
-----------------------------------------------------
-
-src/zorbatypes/m_apm.h
-src/zorbatypes/mapm/
-
-Copyright: 1999-2007 Michael C. Ring
-Website: http://www.tc.umn.edu/~ringx004/mapm-main.html
-
-      This software is Freeware.
-
-      Permission to use, copy, and distribute this software and its
-      documentation for any purpose with or without fee is hereby granted,
-      provided that the above copyright notice appear in all copies and
-      that both that copyright notice and this permission notice appear
-      in supporting documentation.
-
-      Permission to modify the software is granted. Permission to distribute
-      the modified code is granted. Modifications are to be distributed by
-      using the file 'license.txt' as a template to modify the file header.
-      'license.txt' is available in the official MAPM distribution.
-
-      To distribute modified source code, insert the file 'license.txt'
-      at the top of all modified source code files and edit accordingly.
-
-      This software is provided "as is" without express or implied warranty.
-    
-----------------------------------------------------
-
-src/zorbamisc/config/stdint.h
-
-Copyright: 2006 Alexander Chemeris
-
-
-      Redistribution and use in source and binary forms, with or without
-      modification, are permitted provided that the following conditions are met:
-
-      1. Redistributions of source code must retain the above copyright notice,
-      this list of conditions and the following disclaimer.
-
-      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.
-
-      3. The name of the author may be used to endorse or promote products
-      derived from this software without specific prior written permission.
-
-      THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
-    
-----------------------------------------------------
-
-src/zorbautils/stemmer/
-
-Copyright: 2001 Dr. Martin Porter
-
-
-      All the software given out on this Snowball site is covered by the BSD
-      License (see http://www.opensource.org/licenses/bsd-license.html), with
-      Copyright (c) 2001, Dr Martin Porter, and (for the Java developments)
-      Copyright (c) 2002, Richard Boulton.
-
-      Essentially, all this means is that you can do what you like with the code,
-      except claim another Copyright for it, or claim that it is issued under a
-      different license. The software is also issued without warranties, which
-      means that if anyone suffers through its use, they cannot come back and sue
-      you. You also have to alert anyone to whom you give the Snowball software to
-      the fact that it is covered by the BSD license.
-
-      We have not bothered to insert the licensing arrangement into the text of
-      the Snowball software.
-    
-----------------------------------------------------
-
-src/util/less.h
-
-Copyright: 1998 Paul J. Lucas
-
-
-      Redistribution and use in source and binary forms, with or without
-      modification, are permitted provided that the following conditions are met:
-
-      o  Redistributions of source code must retain the above copyright notice,
-      this list of conditions and the following disclaimer.
-
-      o  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.
-
-      o  The name of the author may not be used to endorse or promote products
-      derived from this software without specific prior written permission.
-
-      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.
-    
-----------------------------------------------------
-
-src/util/auto_vector.h (has been modified)
-
-Copyright: 2003 Reliable Software
-
-
-      Redistribution and use in source and binary forms, with or without
-      modification, are permitted provided that the following conditions are met:
-
-      o  Redistributions of source code must retain the above copyright notice,
-      this list of conditions and the following disclaimer.
-
-      o  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.
-
-      o  The name of the author may not be used to endorse or promote products
-      derived from this software without specific prior written permission.
-
-      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.
-    
-----------------------------------------------------
-
-cmake_modules/FindBoost.cmake
-
-Copyright: 
-      2006-2008 Andreas Schneider <mail@xxxxxxxxxxxx>
-      2007      Wengo
-      2007      Mike Jackson
-      2008      Andreas Pakulat <apaku@xxxxxx>
-    
-
-
-      Redistribution AND use is allowed according to the terms of the New BSD license.
-      For details see the accompanying COPYING-CMAKE-SCRIPTS file.
-    
-----------------------------------------------------
-
-cmake_modules/FindJNI.cmake
-cmake_modules/FindPythonLibs.cmake
-cmake_modules/FindSWIG.cmake
-
-Copyright: 2001-2009 Kitware, Inc.
-
-
-      Distributed under the OSI-approved BSD License (the "License");
-      see accompanying file Copyright.txt for details.
-
-      This software is distributed WITHOUT ANY WARRANTY; without even the
-      implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-      See the License for more information.
-
-      CMake - Cross Platform Makefile Generator
-      Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
-      All rights reserved.
-
-      Redistribution and use in source and binary forms, with or without
-      modification, are permitted provided that the following conditions
-      are met:
-
-      * Redistributions of source code must retain the above copyright
-      notice, this list of conditions and the following disclaimer.
-
-      * 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.
-
-      * 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.
-
-      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.
-
-      ------------------------------------------------------------------------------
-
-      The above copyright and license notice applies to distributions of
-      CMake in source and binary form.  Some source files contain additional
-      notices of original copyright by their contributors; see each source
-      for details.  Third-party software packages supplied with CMake under
-      compatible licenses provide their own copyright notices documented in
-      corresponding subdirectories.
-
-      ------------------------------------------------------------------------------
-
-      CMake was initially developed by Kitware with the following sponsorship:
-
-      * National Library of Medicine at the National Institutes of Health
-      as part of the Insight Segmentation and Registration Toolkit (ITK).
-
-      * US National Labs (Los Alamos, Livermore, Sandia) ASC Parallel
-      Visualization Initiative.
-
-      * National Alliance for Medical Image Computing (NAMIC) is funded by the
-      National Institutes of Health through the NIH Roadmap for Medical Research,
-      Grant U54 EB005149.
-
-      * Kitware, Inc.
-    
-----------------------------------------------------
-
-/xml.xsd
-
-Copyright: 2001 World Wide Web Consortium, (Massachusetts Institute of Technology, European Research Consortium for Informatics and Mathematics, Keio University)
-
-
-      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.
-
-      W3C Software Notice and License
-
-      This work (and included software, documentation such as READMEs, or other related items) is being provided by the copyright holders under the following license.
-
-      License
-
-      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.
-
-      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:
-      •The full text of this NOTICE in a location viewable to users of the redistributed or derivative work.
-      •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.
-      •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.)
-
-      Disclaimers
-
-      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.
-
-      COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR DOCUMENTATION.
-
-      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.
-    
-----------------------------------------------------
-
-schemas/xslt-xquery-serialization.xsd
-
-Copyright: 2010 World Wide Web Consortium, (Massachusetts Institute of Technology, European Research Consortium for Informatics and Mathematics, Keio University)
-
-
-      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.
-
-      W3C Software Notice and License
-
-      This work (and included software, documentation such as READMEs, or other related items) is being provided by the copyright holders under the following license.
-
-      License
-
-      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.
-
-      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:
-      •The full text of this NOTICE in a location viewable to users of the redistributed or derivative work.
-      •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.
-      •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.)
-
-      Disclaimers
-
-      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.
-
-      COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR DOCUMENTATION.
-
-      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.
-    
-----------------------------------------------------
-
-modules/w3c/xpath-functions.xsd
-
-Copyright: 2005 World Wide Web Consortium, (Massachusetts Institute of Technology, European Research Consortium for Informatics and Mathematics, Keio University)
-
-
-      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.
-
-      W3C Software Notice and License
-
-      This work (and included software, documentation such as READMEs, or other related items) is being provided by the copyright holders under the following license.
-
-      License
-
-      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.
-
-      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:
-      •The full text of this NOTICE in a location viewable to users of the redistributed or derivative work.
-      •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.
-      •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.)
-
-      Disclaimers
-
-      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.
-
-      COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR DOCUMENTATION.
-
-      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.
-    
-----------------------------------------------------
-
-include/xqc.h
-
-Copyright: 2008, Matthias Brantner, John Snelson
-
-
-      * All rights reserved.
-      *
-      * Redistribution and use in source and binary forms, with or without
-      * modification, are permitted provided that the following conditions are met:
-      *
-      *     * Redistributions of source code must retain the above copyright notice,
-      *       this list of conditions and the following disclaimer.
-      *     * 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.
-      *     * Neither the name of the developers nor the names of contributors may be
-      *       used to endorse or promote products derived from this software without
-      *       specific prior written permission.
-      *
-      * 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 OWNER 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.
-    
-----------------------------------------------------
-
-modules/functx/functx.xq
-
-Copyright: 2007 Datypic
-
-
-      : This library is free software; you can redistribute it and/or
-      : modify it under the terms of the GNU Lesser General Public
-      : License as published by the Free Software Foundation; either
-      : version 2.1 of the License.
-
-      : This library is distributed 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.  See the GNU
-      : Lesser General Public License for more details.
-
-      : You should have received a copy of the GNU Lesser General Public
-      : License along with this library; if not, write to the Free Software
-      : Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
-    
-----------------------------------------------------
-
-src/compiler/parser/FlexLexer.h
-
-Copyright: 1993 The Regents of the University of California
-
-
-      // All rights reserved.
-      //
-      // This code is derived from software contributed to Berkeley by
-      // Kent Williams and Tom Epperly.
-      //
-      //  Redistribution and use in source and binary forms, with or without
-      //  modification, are permitted provided that the following conditions
-      //  are met:
-
-      //  1. Redistributions of source code must retain the above copyright
-      //  notice, this list of conditions and the following disclaimer.
-      //  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.
-
-      //  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.
-
-      //  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.
-    
-----------------------------------------------------
-
-src/diagnostics/StackWalker.cpp
-src/diagnostics/StackWalker.h
-
-Copyright: 2005 Jochen Kalmbach 
-
-
-      Under BSD License: http://www.opensource.org/licenses/bsd-license.php
-    
-----------------------------------------------------
-
-src/util/singleton.h
-src/util/threads.h
-
-Copyright: 2001 Andrei Alexandrescu
-
-
-      This code accompanies the book:
-      Alexandrescu, Andrei. "Modern C++ Design: Generic Programming and Design
-          Patterns Applied". Copyright (c) 2001. Addison-Wesley.
-      Permission to use, copy, modify, distribute and sell this software for any
-          purpose is hereby granted without fee, provided that the above copyright
-          notice appear in all copies and that both that copyright notice and this
-          permission notice appear in supporting documentation.
-      The author or Addison-Wesley Longman make no representations about the
-          suitability of this software for any purpose. It is provided "as is"
-          without express or implied warranty.
-    
-
-External libraries used by this project:
-----------------------------------------------------
-
-Name: LIBXML2
-Preferred version: 2.2.16 or higher
-Is mandatory: true
-Website: http://xmlsoft.org/
-License: MIT
-Copyright: 1998-2002 Daniel Veillard.  All Rights Reserved.
-External notice: 
-
-      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:
-
-      The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-
-      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.
-
-      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 deal-
-      ings in this Software without prior written authorization from him.
-    
-----------------------------------------------------
-
-Name: LIBXSLT
-Preferred version: 1.1.26
-Is mandatory: false
-Website: http://xmlsoft.org/XSLT/
-License: MIT
-Copyright: 2001-2002 Daniel Veillard.  All Rights Reserved.
-External notice: 
-
-      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:
-
-      The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-
-      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.
-
-
-      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.
-
-    
-----------------------------------------------------
-
-Name: ICU4C
-Preferred version: 3.6 or higher
-Is mandatory: true
-Website: http://www.icu-project.org/
-License: ICU License
-Copyright: 1995-2011 International Business Machines Corporation and others 
-External notice: 
-
-      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.
-
-      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.
-
-      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.
-    
-----------------------------------------------------
-
-Name: CURL
-Preferred version: above 7.12
-Is mandatory: false
-Website: http://curl.haxx.se/
-License: MIT/X derivate license
-Copyright: 1996 - 2011, Daniel Stenberg, <daniel@xxxxxxx>.
-External notice: 
-
-      All rights reserved.
-
-      Permission to use, copy, modify, and distribute this software for any purpose
-      with or without fee is hereby granted, provided that the above copyright
-      notice and this permission notice appear in all copies.
-
-      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 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.
-
-      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.
-    
-----------------------------------------------------
-
-Name: ICONV
-Preferred version: above 1.12
-Is mandatory: true
-Website: http://www.gnu.org/software/libiconv/
-License: LGPL
-Copyright: 1998, 2010 Free Software Foundation, Inc.
-External notice: 
-
-----------------------------------------------------
-
-Name: ZLIB
-Preferred version: 1.2.5
-Is mandatory: true
-Website: http://www.zlib.net/
-Copyright: 1995-2004 Jean-loup Gailly and Mark Adler
-External notice: 
-
-      This software is provided 'as-is', without any express or implied
-      warranty.  In no event will the authors be held liable for any damages
-      arising from the use of this software.
-
-      Permission is granted to anyone to use this software for any purpose,
-      including commercial applications, and to alter it and redistribute it
-      freely, subject to the following restrictions:
-
-      1. The origin of this software must not be misrepresented; you must not
-      claim that you wrote the original software. If you use this software
-      in a product, an acknowledgment in the product documentation would be
-      appreciated but is not required.
-      2. Altered source versions must be plainly marked as such, and must not be
-      misrepresented as being the original software.
-      3. This notice may not be removed or altered from any source distribution.
-
-      Jean-loup Gailly jloup@xxxxxxxx
-      Mark Adler madler@xxxxxxxxxxxxxxxxxx
-    
-----------------------------------------------------
-
-Name: XERCES
-Preferred version: 2.8.0 or higher
-Is mandatory: true
-Website: http://xerces.apache.org/xerces-c/
-License: Apache 2
-Copyright: Copyright © 1999-2010 The Apache Software Foundation. All Rights Reserved.
-External notice: 
-
-      http://www.apache.org/licenses/LICENSE-2.0
-    
-----------------------------------------------------
-
-Name: BOOST (boost_filesystem)
-Preferred version: 1.32 or higher
-Is mandatory: false
-Website: http://www.boost.org/
-License: Boost Software License v1.0
-Copyright: 
-      Beman Dawes, David Abrahams, 1998-2005.
-      Rene Rivera 2004-2007
-    
-External notice: 
-
-      Permission is hereby granted, free of charge, to any person or organization
-      obtaining a copy of the software and accompanying documentation covered by
-      this license (the "Software") to use, reproduce, display, distribute,
-      execute, and transmit the Software, and to prepare derivative works of the
-      Software, and to permit third-parties to whom the Software is furnished to
-      do so, all subject to the following:
-
-      The copyright notices in the Software and this entire statement, including
-      the above license grant, this restriction and the following disclaimer,
-      must be included in all copies of the Software, in whole or in part, and
-      all derivative works of the Software, unless such copies or derivative
-      works are solely in the form of machine-executable object code generated by
-      a source language processor.
-
-      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, TITLE AND NON-INFRINGEMENT. IN NO EVENT
-      SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
-      FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
-      ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
-      DEALINGS IN THE SOFTWARE.
-    
-
-External applications used by this project:
-----------------------------------------------------
-
-Name: FLEX
-Preferred version: 2.5.33
-Is mandatory: false
-Website: http://flex.sourceforge.net/
-Copyright: 
-      2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The Flex Project.
-      1990, 1997 The Regents of the University of California. All rights reserved.
-    
-External notice: 
-
-      Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
-
-      1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
-      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.
-      
-      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.
-
-      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.
-    
-----------------------------------------------------
-
-Name: BISON
-Preferred version: 2.4 or higher
-Is mandatory: false
-Website: http://www.gnu.org/software/bison/
-License: GPL
-Copyright: 1998, 2001, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
-External notice: 
-
-----------------------------------------------------
-
-Name: DOXYGEN
-Preferred version: v1.7.4 
-Is mandatory: false
-Website: www.doxygen.org
-License: GPL
-Copyright: 1997-2011 by Dimitri van Heesch
-External notice: 
-
-      Permission to use, copy, modify, and distribute this software and its documentation under the terms of the GNU General Public License is hereby granted.
-      No representations are made about the suitability of this software for any purpose. 
-      It is provided "as is" without express or implied warranty. 
-      See the GNU General Public License for more details.
-
-      Documents produced by doxygen are derivative works derived from the input used in their production; they are not affected by this license.
-    
-----------------------------------------------------
-
-Name: CMAKE
-Preferred version: 2.8.4
-Is mandatory: true
-Website: http://www.cmake.org/
-License: Creative Commons Attribution-NoDerivs 3.0 Unported License
-Copyright: 2000-2009 Kitware, Inc., Insight Software Consortium. All rights reserved.
-External notice: 
-
-      Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
-
-      Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
-
-      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.
-
-      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.
-
-      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.
-    
-----------------------------------------------------
-
-Name: SWIG
-Preferred version: 2.0.4 or above
-Is mandatory: false
-Website: http://www.swig.org/
-License: GPL
-Copyright: 
-      1995-2011 The SWIG Developers
-      2005-2006 Arizona Board of Regents (University of Arizona).
-      1998-2005 University of Chicago.
-      1995-1998 The University of Utah and the Regents of the University of California
-    
-External notice: 
-
-      SWIG is free software: you can redistribute it and/or modify it
-      under the terms of the GNU General Public License as published by
-      the Free Software Foundation, either version 3 of the License, or
-      (at your option) any later version. See the LICENSE-GPL file for
-      the full terms of the GNU General Public license version 3.
-
-      Portions of SWIG are also licensed under the terms of the licenses
-      in the file LICENSE-UNIVERSITIES. You must observe the terms of
-      these licenses, as well as the terms of the GNU General Public License,
-      when you distribute SWIG.
-
-      The SWIG library and examples, under the Lib and Examples top level
-      directories, are distributed under the following terms:
-
-      You may copy, modify, distribute, and make derivative works based on
-      this software, in source code or object code form, without
-      restriction. If you distribute the software to others, you may do
-      so according to the terms of your choice. This software is offered as
-      is, without warranty of any kind.
-
-      See the COPYRIGHT file for a list of contributors to SWIG and their
-      copyright notices.
-    
\ No newline at end of file

=== 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 09:35:12 +0000
@@ -286,6 +286,10 @@
 
 extern ZORBA_DLL_PUBLIC XQueryErrorCode FOTY0015;
 
+extern ZORBA_DLL_PUBLIC XQueryErrorCode FOUT1170;
+
+extern ZORBA_DLL_PUBLIC XQueryErrorCode FOUT1190;
+
 extern ZORBA_DLL_PUBLIC XQueryErrorCode XUST0001;
 
 extern ZORBA_DLL_PUBLIC XQueryErrorCode XUST0002;

=== 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 09:35:12 +0000
@@ -1240,6 +1240,24 @@
 
 (:~
  :
+ : Identifier cannot be used to retrive a resource containing text
+ : 
+ : @see http://www.w3.org/2005/xqt-errors
+:)
+declare variable $err:FOUT1170 as xs:QName := fn:QName($err:NS, "err:FOUT1170");
+
+(:~
+ :
+ : Retrieved resource contains octets that cannot be decoded into Unicode 
+ : using the specified encoding, the resulting characters are not 
+ : permitted XML characters or requested encoding not supported
+ : 
+ : @see http://www.w3.org/2005/xqt-errors
+:)
+declare variable $err:FOUT1190 as xs:QName := fn:QName($err:NS, "err:FOUT1190");
+
+(:~
+ :
  : It is a static error if an updating expression is used in any position
  : other than one of the following:
  : - The topmost expression in the body of a query.

=== 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 09:35:12 +0000
@@ -994,4 +994,49 @@
 (:~
  : @see for semantics please check <a href="http://www.w3.org/TR/xpath-functions-30/#func-string";>fn:string</a>
  :)
-declare function fn:string($arg as item()?) as xs:string external;
\ No newline at end of file
+declare function fn:string($arg as item()?) as xs:string external;
+
+(:~
+ : @see for semantics please check <a href="http://www.w3.org/TR/xpath-functions-30/#func-available-environment-variables";>fn:available-environment-variables</a>
+ :)
+declare function fn:available-environment-variables() as xs:string* external;
+
+(:~
+ : @see for semantics please check <a href="http://www.w3.org/TR/xpath-functions-30/#func-environment-variable";>fn:environment-variable</a>
+ :)
+declare function fn:environment-variable($arg as xs:string) as xs:string? external;
+
+(:~
+ : @see for semantics please check <a href="http://www.w3.org/TR/xpath-functions-30/#func-unparsed-text";>fn:unparsed-text</a>
+ :)
+declare function fn:unparsed-text($href as xs:string?) as xs:string? external;
+
+(:~
+ : @see for semantics please check <a href="http://www.w3.org/TR/xpath-functions-30/#func-unparsed-text";>fn:unparsed-text</a>
+ :)
+declare function fn:unparsed-text($href as xs:string?, $encoding as xs:string) as xs:string? external;
+
+(:~
+ : @see for semantics please check <a href="http://www.w3.org/TR/xpath-functions-30/#func-unparsed-text-available";>fn:unparsed-text-available</a>
+ :)
+declare function fn:unparsed-text-available($href as xs:string?) as xs:boolean external;
+
+(:~
+ : @see for semantics please check <a href="http://www.w3.org/TR/xpath-functions-30/#func-unparsed-text-lines";>fn:unparsed-text-lines</a>
+ :)
+declare function fn:unparsed-text-lines(	$href	 as xs:string?, $encoding	 as xs:string) as xs:string* external;
+
+(:~
+ : @see for semantics please check <a href="http://www.w3.org/TR/xpath-functions-30/#func-unparsed-text-available";>fn:unparsed-text-available</a>
+ :)
+declare function fn:unparsed-text-available(	$href	 as xs:string?, $encoding	 as xs:string) as xs:boolean external;
+
+(:~
+ : @see for semantics please check <a href="http://www.w3.org/TR/xpath-functions-30/#func-uri-collection";>fn:uri-collection</a>
+ :)
+declare function fn:uri-collection() as xs:anyURI* external;
+
+(:~
+ : @see for semantics please check <a href="http://www.w3.org/TR/xpath-functions-30/#func-uri-collection";>fn:uri-collection</a>
+ :)
+declare function fn:uri-collection($arg as xs:string?) as xs:anyURI* external;

=== 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 09:35:12 +0000
@@ -21,6 +21,7 @@
 #include <sys/timeb.h>
 #ifdef UNIX
 #include <sys/time.h>
+#include <unistd.h>
 #endif
 
 #include "store/api/iterator.h"
@@ -29,6 +30,7 @@
 #include "store/api/store.h"
 #include "store/api/index.h"
 #include "store/api/ic.h"
+#include "store/api/iterator_factory.h"
 
 #include "system/globalenv.h"
 
@@ -54,10 +56,13 @@
 
 using namespace std;
 
+#ifdef UNIX
+//external variables
+extern char **environ;
+#endif
+
 namespace zorba
 {
-
-
 /*******************************************************************************
 
 ********************************************************************************/
@@ -122,6 +127,7 @@
   theParent(NULL),
   keymap(NULL),
   theAvailableIndices(NULL),
+  theEnvironmentVariables(NULL),
   theDocLoadingUserTime(0.0),
   theDocLoadingTime(0)
 {
@@ -161,6 +167,9 @@
     delete keymap;
   }
 
+  if(theEnvironmentVariables)
+    delete theEnvironmentVariables;
+
   if (theAvailableIndices)
     delete theAvailableIndices;
 }
@@ -259,6 +268,145 @@
 /*******************************************************************************
 
 ********************************************************************************/
+void dynamic_context::set_environment_variables()
+{
+  if (!theEnvironmentVariables)
+    theEnvironmentVariables = new EnvVarMap();
+
+#if defined (WIN32)
+    LPTCH envVarsCH = GetEnvironmentStrings();
+    LPTSTR envVarsSTR = (LPTSTR) envVarsCH;
+
+    while (*envVarsSTR)
+    {
+      int size = lstrlen(envVarsSTR);
+
+      char * envVar = new char[size+1];
+      
+      
+      WideCharToMultiByte( CP_ACP, 
+                           WC_NO_BEST_FIT_CHARS|WC_COMPOSITECHECK|WC_DEFAULTCHAR, 
+                           envVarsSTR, 
+                           size+1, 
+                           envVar, 
+                           size+1,
+                           NULL,
+                           NULL);
+      
+
+      zstring envVarZS(envVar);
+      
+      int eqPos = envVarZS.find_first_of("=");
+
+      if (eqPos > 0)
+      {
+        zstring varname(envVarZS.substr(0, eqPos));
+        zstring varvalue(envVarZS.substr(eqPos+1, size));
+
+        if (!varname.empty() || !varvalue.empty())
+          theEnvironmentVariables->insert(std::pair<zstring, zstring>(varname,varvalue));
+      }
+      
+      delete envVar;
+      envVarsSTR += lstrlen(envVarsSTR) + 1;
+    }
+    
+    FreeEnvironmentStrings(envVarsCH);
+#else    
+    const char* invalid_char;
+    for (char **env = environ; *env; ++env)
+    {
+      zstring envVarZS(*env);
+      
+      if ((invalid_char = utf8::validate(envVarZS.c_str())) != NULL)
+        throw XQUERY_EXCEPTION(err::FOCH0001,
+          ERROR_PARAMS(zstring("#x") + 
+          BUILD_STRING(std::uppercase << std::hex 
+            << (static_cast<unsigned int>(*invalid_char)&0xFF))));
+
+      if ((invalid_char = utf8::validate(envVarZS.c_str())) != NULL)
+      {
+        throw XQUERY_EXCEPTION(err::FOCH0001, 
+        ERROR_PARAMS(zstring("#x") + 
+        BUILD_STRING(std::uppercase << std::hex
+                     << (static_cast<unsigned int>(*invalid_char) & 0xFF)) ));
+      }
+
+      int size = envVarZS.size();
+            
+      int eqPos = envVarZS.find_first_of("=");
+            
+      if (eqPos > 0)
+      {
+        zstring varname(envVarZS.substr(0, eqPos));
+        zstring varvalue(envVarZS.substr(eqPos+1, size));
+                                                  
+        if (!varname.empty() || !varvalue.empty())
+          theEnvironmentVariables->insert(std::pair<zstring, zstring>(varname,varvalue));
+      }                                                                   
+    }
+     
+#endif
+    
+}
+/*******************************************************************************
+
+********************************************************************************/
+store::Iterator_t dynamic_context::available_environment_variables()
+{
+  if (!theEnvironmentVariables)
+  {
+    set_environment_variables();
+  }
+
+  EnvVarMap::iterator lIte = theEnvironmentVariables->begin();
+  EnvVarMap::iterator lEnd = theEnvironmentVariables->end();
+
+  std::vector<store::Item_t> lVarNames;
+
+  for (;lIte != lEnd; ++lIte)
+  {
+    store::Item_t varname;
+    zstring zsvarname = lIte->first;
+    GENV_ITEMFACTORY->createString(varname, zsvarname);
+    lVarNames.push_back(varname);
+  }
+
+  if (lVarNames.empty())
+  {
+    return NULL;
+  }
+
+  return GENV_STORE.createTempSeq(lVarNames)->getIterator(); 
+}
+
+/*******************************************************************************
+
+********************************************************************************/
+store::Item_t dynamic_context::get_environment_variable(const zstring& varname)
+{
+
+  if (!theEnvironmentVariables)
+  {
+    set_environment_variables();
+  }
+
+  EnvVarMap::iterator lIter = theEnvironmentVariables->find(varname);
+
+  if (lIter == theEnvironmentVariables->end())
+  {
+    return NULL;
+  }
+
+  store::Item_t value; 
+  zstring varvalue = lIter->second;
+  GENV_ITEMFACTORY->createString(value, varvalue);
+  return value;
+}
+
+/*******************************************************************************
+
+********************************************************************************/
 void dynamic_context::add_variable(ulong varid, store::Iterator_t& value) 
 {
   declare_variable(varid);
@@ -607,7 +755,6 @@
   {
     keymap = new ValueMap(8, false);
   }
-
   if (!keymap->insert(aName, val))
   {
     keymap->update(aName, val);

=== 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 09:35:12 +0000
@@ -105,6 +105,8 @@
 
   typedef ItemPointerHashMap<store::Index_t> IndexMap;
 
+  typedef std::map<const zstring,const zstring> EnvVarMap;
+
 protected:
   dynamic_context            * theParent;
 
@@ -119,6 +121,9 @@
 
   IndexMap                   * theAvailableIndices;
 
+    //MODIFY
+  EnvVarMap                  * theEnvironmentVariables;
+
 public:
   double                       theDocLoadingUserTime;
   double                       theDocLoadingTime;
@@ -142,6 +147,12 @@
 
   store::Item_t get_current_time_millis() const;
 
+  void set_environment_variables();
+
+  store::Item_t get_environment_variable(const zstring& varname);
+
+  store::Iterator_t available_environment_variables();
+
   void set_implicit_timezone(long tzone_seconds);
 
   long get_implicit_timezone() const;

=== 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 09:35:12 +0000
@@ -1142,7 +1142,23 @@
        An argument to \c fn:deep-equal() contains a function item.
       </comment>
       <value>"$1": argument to fn:deep-equal() contains a function item</value>
+    </diagnostic>  
+    
+    <diagnostic code="FOUT1170">
+      <comment>
+       Identifier cannot be used to retrive a resource containing text
+      </comment>
+      <value>"$1": error retrieving resource containing text</value>
     </diagnostic>
+    
+    <diagnostic code="FOUT1190">
+      <comment>
+       Retrieved resource contains octets that cannot be decoded into Unicode 
+       using the specified encoding, the resulting characters are not 
+       permitted XML characters or requested encoding not supported
+      </comment>
+      <value>"$1": Cannot decode resource retrieved</value>
+    </diagnostic>  
 
     <!--////////// XQuery Update Facility //////////////////////////////////-->
 

=== 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 09:35:12 +0000
@@ -411,6 +411,12 @@
 XQueryErrorCode FOTY0015( "FOTY0015" );
 
 
+XQueryErrorCode FOUT1170( "FOUT1170" );
+
+
+XQueryErrorCode FOUT1190( "FOUT1190" );
+
+
 XQueryErrorCode XUST0001( "XUST0001" );
 
 

=== 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 09:35:12 +0000
@@ -74,6 +74,8 @@
   { "FOTY0015", "\"$1\": argument to fn:deep-equal() contains a function item" },
   { "FOUP0001", "first operand of fn:put() is not a node of a supported kind" },
   { "FOUP0002", "second operand of fn:put() is not a valid lexical representation of the xs:anyURI type" },
+  { "FOUT1170", "\"$1\": error retrieving resource containing text" },
+  { "FOUT1190", "\"$1\": Cannot decode resource retrieved" },
 #if !defined(ZORBA_NO_FULL_TEXT)
   { "FTDY0016", "\"$1\": invalid weight: absolute value must be in [0,1000]" },
 #endif

=== 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 09:35:12 +0000
@@ -0,0 +1,111 @@
+/*
+ * Copyright 2006-2008 The FLWOR Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+ 
+// ******************************************
+// *                                        *
+// * THIS IS A GENERATED FILE. DO NOT EDIT! *
+// * SEE .xml FILE WITH SAME NAME           *
+// *                                        *
+// ******************************************
+
+
+#include "stdafx.h"
+#include "runtime/access/access.h"
+#include "functions/func_access.h"
+
+
+namespace zorba{
+
+
+
+PlanIter_t fn_unparsed_text::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new FnUnparsedTextIterator(sctx, loc, argv);
+}
+
+PlanIter_t fn_unparsed_text_available::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new FnUnparsedTextAvailableIterator(sctx, loc, argv);
+}
+
+void populate_context_access(static_context* sctx)
+{
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_unparsed_text,
+        (createQName("http://www.w3.org/2005/xpath-functions","","unparsed-text";), 
+        GENV_TYPESYSTEM.STRING_TYPE_QUESTION, 
+        GENV_TYPESYSTEM.STRING_TYPE_QUESTION),
+        FunctionConsts::FN_UNPARSED_TEXT_1);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_unparsed_text,
+        (createQName("http://www.w3.org/2005/xpath-functions","","unparsed-text";), 
+        GENV_TYPESYSTEM.STRING_TYPE_QUESTION, 
+        GENV_TYPESYSTEM.STRING_TYPE_ONE, 
+        GENV_TYPESYSTEM.STRING_TYPE_QUESTION),
+        FunctionConsts::FN_UNPARSED_TEXT_2);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_unparsed_text_available,
+        (createQName("http://www.w3.org/2005/xpath-functions","","unparsed-text-available";), 
+        GENV_TYPESYSTEM.STRING_TYPE_QUESTION, 
+        GENV_TYPESYSTEM.STRING_TYPE_QUESTION),
+        FunctionConsts::FN_UNPARSED_TEXT_AVAILABLE_1);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_unparsed_text_available,
+        (createQName("http://www.w3.org/2005/xpath-functions","","unparsed-text-available";), 
+        GENV_TYPESYSTEM.STRING_TYPE_QUESTION, 
+        GENV_TYPESYSTEM.STRING_TYPE_ONE, 
+        GENV_TYPESYSTEM.STRING_TYPE_QUESTION),
+        FunctionConsts::FN_UNPARSED_TEXT_AVAILABLE_2);
+
+  }
+
+}
+
+
+}
+
+
+

=== 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 09:35:12 +0000
@@ -0,0 +1,79 @@
+/*
+ * Copyright 2006-2008 The FLWOR Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+ 
+// ******************************************
+// *                                        *
+// * THIS IS A GENERATED FILE. DO NOT EDIT! *
+// * SEE .xml FILE WITH SAME NAME           *
+// *                                        *
+// ******************************************
+
+
+#ifndef ZORBA_FUNCTIONS_ACCESS_H
+#define ZORBA_FUNCTIONS_ACCESS_H
+
+
+#include "common/shared_types.h"
+#include "functions/function_impl.h"
+
+
+namespace zorba {
+
+
+void populate_context_access(static_context* sctx);
+
+
+
+
+//fn:unparsed-text
+class fn_unparsed_text : public function
+{
+public:
+  fn_unparsed_text(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  CODEGEN_DECL();
+};
+
+
+//fn:unparsed-text-available
+class fn_unparsed_text_available : public function
+{
+public:
+  fn_unparsed_text_available(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  CODEGEN_DECL();
+};
+
+
+} //namespace zorba
+
+
+#endif
+/*
+ * Local variables:
+ * mode: c++
+ * End:
+ */ 

=== modified file 'src/functions/pregenerated/func_accessors.cpp'
--- src/functions/pregenerated/func_accessors.cpp	2012-03-28 05:19:57 +0000
+++ src/functions/pregenerated/func_accessors.cpp	2012-04-13 09:35:12 +0000
@@ -1,259 +1,259 @@
-/*
- * Copyright 2006-2008 The FLWOR Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- 
-// ******************************************
-// *                                        *
-// * THIS IS A GENERATED FILE. DO NOT EDIT! *
-// * SEE .xml FILE WITH SAME NAME           *
-// *                                        *
-// ******************************************
-
-
-#include "stdafx.h"
-#include "runtime/accessors/accessors.h"
-#include "functions/func_accessors.h"
-
-
-namespace zorba{
-
-
-
-PlanIter_t fn_node_name_3_0::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new NodeNameIterator(sctx, loc, argv);
-}
-PlanIter_t fn_node_name::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new NodeNameIterator(sctx, loc, argv);
-}
-
-PlanIter_t fn_nilled::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new NilledIterator(sctx, loc, argv);
-}
-
-
-PlanIter_t fn_data::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new FnDataIterator(sctx, loc, argv);
-}
-
-PlanIter_t fn_base_uri::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new BaseUriIterator(sctx, loc, argv);
-}
-
-PlanIter_t fn_document_uri_3_0::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new DocumentUriIterator(sctx, loc, argv);
-}
-PlanIter_t fn_document_uri::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new DocumentUriIterator(sctx, loc, argv);
-}
-
-PlanIter_t fn_root::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new RootIterator(sctx, loc, argv);
-}
-
-void populate_context_accessors(static_context* sctx)
-{
-  {
-    
-
-    DECL_WITH_KIND(sctx, fn_node_name_3_0,
-        (createQName("http://www.w3.org/2005/xpath-functions","","node-name";), 
-        GENV_TYPESYSTEM.QNAME_TYPE_QUESTION),
-        FunctionConsts::FN_NODE_NAME_0);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, fn_node_name,
-        (createQName("http://www.w3.org/2005/xpath-functions","","node-name";), 
-        GENV_TYPESYSTEM.ANY_NODE_TYPE_QUESTION, 
-        GENV_TYPESYSTEM.QNAME_TYPE_QUESTION),
-        FunctionConsts::FN_NODE_NAME_1);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, fn_nilled,
-        (createQName("http://www.w3.org/2005/xpath-functions","","nilled";), 
-        GENV_TYPESYSTEM.ANY_NODE_TYPE_QUESTION, 
-        GENV_TYPESYSTEM.BOOLEAN_TYPE_QUESTION),
-        FunctionConsts::FN_NILLED_1);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, fn_string,
-        (createQName("http://www.w3.org/2005/xpath-functions","","string";), 
-        GENV_TYPESYSTEM.STRING_TYPE_ONE),
-        FunctionConsts::FN_STRING_0);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, fn_string,
-        (createQName("http://www.w3.org/2005/xpath-functions","","string";), 
-        GENV_TYPESYSTEM.ITEM_TYPE_QUESTION, 
-        GENV_TYPESYSTEM.STRING_TYPE_ONE),
-        FunctionConsts::FN_STRING_1);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, fn_data,
-        (createQName("http://www.w3.org/2005/xpath-functions","","data";), 
-        GENV_TYPESYSTEM.ITEM_TYPE_STAR, 
-        GENV_TYPESYSTEM.ANY_ATOMIC_TYPE_STAR),
-        FunctionConsts::FN_DATA_1);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, fn_base_uri,
-        (createQName("http://www.w3.org/2005/xpath-functions","","base-uri";), 
-        GENV_TYPESYSTEM.ANY_URI_TYPE_QUESTION),
-        FunctionConsts::FN_BASE_URI_0);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, fn_base_uri,
-        (createQName("http://www.w3.org/2005/xpath-functions","","base-uri";), 
-        GENV_TYPESYSTEM.ANY_NODE_TYPE_QUESTION, 
-        GENV_TYPESYSTEM.ANY_URI_TYPE_QUESTION),
-        FunctionConsts::FN_BASE_URI_1);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, fn_document_uri_3_0,
-        (createQName("http://www.w3.org/2005/xpath-functions","","document-uri";), 
-        GENV_TYPESYSTEM.ANY_URI_TYPE_QUESTION),
-        FunctionConsts::FN_DOCUMENT_URI_0);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, fn_document_uri,
-        (createQName("http://www.w3.org/2005/xpath-functions","","document-uri";), 
-        GENV_TYPESYSTEM.ANY_NODE_TYPE_QUESTION, 
-        GENV_TYPESYSTEM.ANY_URI_TYPE_QUESTION),
-        FunctionConsts::FN_DOCUMENT_URI_1);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, fn_root,
-        (createQName("http://www.w3.org/2005/xpath-functions","","root";), 
-        GENV_TYPESYSTEM.ANY_NODE_TYPE_QUESTION),
-        FunctionConsts::FN_ROOT_0);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, fn_root,
-        (createQName("http://www.w3.org/2005/xpath-functions","","root";), 
-        GENV_TYPESYSTEM.ANY_NODE_TYPE_QUESTION, 
-        GENV_TYPESYSTEM.ANY_NODE_TYPE_QUESTION),
-        FunctionConsts::FN_ROOT_1);
-
-  }
-
-}
-
-
-}
-
-
-
+/*
+ * Copyright 2006-2008 The FLWOR Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+ 
+// ******************************************
+// *                                        *
+// * THIS IS A GENERATED FILE. DO NOT EDIT! *
+// * SEE .xml FILE WITH SAME NAME           *
+// *                                        *
+// ******************************************
+
+
+#include "stdafx.h"
+#include "runtime/accessors/accessors.h"
+#include "functions/func_accessors.h"
+
+
+namespace zorba{
+
+
+
+PlanIter_t fn_node_name_3_0::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new NodeNameIterator(sctx, loc, argv);
+}
+PlanIter_t fn_node_name::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new NodeNameIterator(sctx, loc, argv);
+}
+
+PlanIter_t fn_nilled::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new NilledIterator(sctx, loc, argv);
+}
+
+
+PlanIter_t fn_data::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new FnDataIterator(sctx, loc, argv);
+}
+
+PlanIter_t fn_base_uri::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new BaseUriIterator(sctx, loc, argv);
+}
+
+PlanIter_t fn_document_uri_3_0::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new DocumentUriIterator(sctx, loc, argv);
+}
+PlanIter_t fn_document_uri::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new DocumentUriIterator(sctx, loc, argv);
+}
+
+PlanIter_t fn_root::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new RootIterator(sctx, loc, argv);
+}
+
+void populate_context_accessors(static_context* sctx)
+{
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_node_name_3_0,
+        (createQName("http://www.w3.org/2005/xpath-functions","","node-name";), 
+        GENV_TYPESYSTEM.QNAME_TYPE_QUESTION),
+        FunctionConsts::FN_NODE_NAME_0);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_node_name,
+        (createQName("http://www.w3.org/2005/xpath-functions","","node-name";), 
+        GENV_TYPESYSTEM.ANY_NODE_TYPE_QUESTION, 
+        GENV_TYPESYSTEM.QNAME_TYPE_QUESTION),
+        FunctionConsts::FN_NODE_NAME_1);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_nilled,
+        (createQName("http://www.w3.org/2005/xpath-functions","","nilled";), 
+        GENV_TYPESYSTEM.ANY_NODE_TYPE_QUESTION, 
+        GENV_TYPESYSTEM.BOOLEAN_TYPE_QUESTION),
+        FunctionConsts::FN_NILLED_1);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_string,
+        (createQName("http://www.w3.org/2005/xpath-functions","","string";), 
+        GENV_TYPESYSTEM.STRING_TYPE_ONE),
+        FunctionConsts::FN_STRING_0);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_string,
+        (createQName("http://www.w3.org/2005/xpath-functions","","string";), 
+        GENV_TYPESYSTEM.ITEM_TYPE_QUESTION, 
+        GENV_TYPESYSTEM.STRING_TYPE_ONE),
+        FunctionConsts::FN_STRING_1);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_data,
+        (createQName("http://www.w3.org/2005/xpath-functions","","data";), 
+        GENV_TYPESYSTEM.ITEM_TYPE_STAR, 
+        GENV_TYPESYSTEM.ANY_ATOMIC_TYPE_STAR),
+        FunctionConsts::FN_DATA_1);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_base_uri,
+        (createQName("http://www.w3.org/2005/xpath-functions","","base-uri";), 
+        GENV_TYPESYSTEM.ANY_URI_TYPE_QUESTION),
+        FunctionConsts::FN_BASE_URI_0);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_base_uri,
+        (createQName("http://www.w3.org/2005/xpath-functions","","base-uri";), 
+        GENV_TYPESYSTEM.ANY_NODE_TYPE_QUESTION, 
+        GENV_TYPESYSTEM.ANY_URI_TYPE_QUESTION),
+        FunctionConsts::FN_BASE_URI_1);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_document_uri_3_0,
+        (createQName("http://www.w3.org/2005/xpath-functions","","document-uri";), 
+        GENV_TYPESYSTEM.ANY_URI_TYPE_QUESTION),
+        FunctionConsts::FN_DOCUMENT_URI_0);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_document_uri,
+        (createQName("http://www.w3.org/2005/xpath-functions","","document-uri";), 
+        GENV_TYPESYSTEM.ANY_NODE_TYPE_QUESTION, 
+        GENV_TYPESYSTEM.ANY_URI_TYPE_QUESTION),
+        FunctionConsts::FN_DOCUMENT_URI_1);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_root,
+        (createQName("http://www.w3.org/2005/xpath-functions","","root";), 
+        GENV_TYPESYSTEM.ANY_NODE_TYPE_QUESTION),
+        FunctionConsts::FN_ROOT_0);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_root,
+        (createQName("http://www.w3.org/2005/xpath-functions","","root";), 
+        GENV_TYPESYSTEM.ANY_NODE_TYPE_QUESTION, 
+        GENV_TYPESYSTEM.ANY_NODE_TYPE_QUESTION),
+        FunctionConsts::FN_ROOT_1);
+
+  }
+
+}
+
+
+}
+
+
+

=== modified file 'src/functions/pregenerated/func_accessors.h'
--- src/functions/pregenerated/func_accessors.h	2012-03-28 05:19:57 +0000
+++ src/functions/pregenerated/func_accessors.h	2012-04-13 09:35:12 +0000
@@ -1,208 +1,208 @@
-/*
- * Copyright 2006-2008 The FLWOR Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- 
-// ******************************************
-// *                                        *
-// * THIS IS A GENERATED FILE. DO NOT EDIT! *
-// * SEE .xml FILE WITH SAME NAME           *
-// *                                        *
-// ******************************************
-
-
-#ifndef ZORBA_FUNCTIONS_ACCESSORS_H
-#define ZORBA_FUNCTIONS_ACCESSORS_H
-
-
-#include "common/shared_types.h"
-#include "functions/function_impl.h"
-
-
-namespace zorba {
-
-
-void populate_context_accessors(static_context* sctx);
-
-
-
-
-//fn:node-name
-class fn_node_name_3_0 : public function
-{
-public:
-  fn_node_name_3_0(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-theXQueryVersion = StaticContextConsts::xquery_version_3_0;
-  }
-
-  bool mustCopyInputNodes(expr* fo, csize producer) const { return false; }
-
-  CODEGEN_DECL();
-};
-
-//fn:node-name
-class fn_node_name : public function
-{
-public:
-  fn_node_name(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-
-  }
-
-  bool mustCopyInputNodes(expr* fo, csize producer) const { return false; }
-
-  CODEGEN_DECL();
-};
-
-
-//fn:nilled
-class fn_nilled : public function
-{
-public:
-  fn_nilled(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-
-  }
-
-  bool mustCopyInputNodes(expr* fo, csize producer) const { return false; }
-
-  CODEGEN_DECL();
-};
-
-
-//fn:string
-class fn_string : public function
-{
-public:
-  fn_string(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-
-  }
-
-  bool mustCopyInputNodes(expr* fo, csize producer) const { return false; }
-
-  CODEGEN_DECL();
-};
-
-
-//fn:data
-class fn_data : public function
-{
-public:
-  fn_data(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-
-  }
-
-  xqtref_t getReturnType(const fo_expr* caller) const;
-
-  bool isMap(ulong producer) const { return producer == 0; }
-
-  BoolAnnotationValue ignoresSortedNodes(expr* fo, csize producer) const;
-
-  BoolAnnotationValue ignoresDuplicateNodes(expr* fo, csize producer) const;
-
-  bool mustCopyInputNodes(expr* fo, csize producer) const;
-
-  CODEGEN_DECL();
-};
-
-
-//fn:base-uri
-class fn_base_uri : public function
-{
-public:
-  fn_base_uri(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-
-  }
-
-  bool mustCopyInputNodes(expr* fo, csize producer) const { return true; }
-
-  CODEGEN_DECL();
-};
-
-
-//fn:document-uri
-class fn_document_uri_3_0 : public function
-{
-public:
-  fn_document_uri_3_0(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-theXQueryVersion = StaticContextConsts::xquery_version_3_0;
-  }
-
-  bool mustCopyInputNodes(expr* fo, csize producer) const { return false; }
-
-  CODEGEN_DECL();
-};
-
-//fn:document-uri
-class fn_document_uri : public function
-{
-public:
-  fn_document_uri(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-
-  }
-
-  bool mustCopyInputNodes(expr* fo, csize producer) const { return false; }
-
-  CODEGEN_DECL();
-};
-
-
-//fn:root
-class fn_root : public function
-{
-public:
-  fn_root(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-
-  }
-
-  bool mustCopyInputNodes(expr* fo, csize producer) const { return true; }
-
-  CODEGEN_DECL();
-};
-
-
-} //namespace zorba
-
-
-#endif
-/*
- * Local variables:
- * mode: c++
- * End:
- */ 
+/*
+ * Copyright 2006-2008 The FLWOR Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+ 
+// ******************************************
+// *                                        *
+// * THIS IS A GENERATED FILE. DO NOT EDIT! *
+// * SEE .xml FILE WITH SAME NAME           *
+// *                                        *
+// ******************************************
+
+
+#ifndef ZORBA_FUNCTIONS_ACCESSORS_H
+#define ZORBA_FUNCTIONS_ACCESSORS_H
+
+
+#include "common/shared_types.h"
+#include "functions/function_impl.h"
+
+
+namespace zorba {
+
+
+void populate_context_accessors(static_context* sctx);
+
+
+
+
+//fn:node-name
+class fn_node_name_3_0 : public function
+{
+public:
+  fn_node_name_3_0(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+theXQueryVersion = StaticContextConsts::xquery_version_3_0;
+  }
+
+  bool mustCopyInputNodes(expr* fo, csize producer) const { return false; }
+
+  CODEGEN_DECL();
+};
+
+//fn:node-name
+class fn_node_name : public function
+{
+public:
+  fn_node_name(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  bool mustCopyInputNodes(expr* fo, csize producer) const { return false; }
+
+  CODEGEN_DECL();
+};
+
+
+//fn:nilled
+class fn_nilled : public function
+{
+public:
+  fn_nilled(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  bool mustCopyInputNodes(expr* fo, csize producer) const { return false; }
+
+  CODEGEN_DECL();
+};
+
+
+//fn:string
+class fn_string : public function
+{
+public:
+  fn_string(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  bool mustCopyInputNodes(expr* fo, csize producer) const { return false; }
+
+  CODEGEN_DECL();
+};
+
+
+//fn:data
+class fn_data : public function
+{
+public:
+  fn_data(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  xqtref_t getReturnType(const fo_expr* caller) const;
+
+  bool isMap(ulong producer) const { return producer == 0; }
+
+  BoolAnnotationValue ignoresSortedNodes(expr* fo, csize producer) const;
+
+  BoolAnnotationValue ignoresDuplicateNodes(expr* fo, csize producer) const;
+
+  bool mustCopyInputNodes(expr* fo, csize producer) const;
+
+  CODEGEN_DECL();
+};
+
+
+//fn:base-uri
+class fn_base_uri : public function
+{
+public:
+  fn_base_uri(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  bool mustCopyInputNodes(expr* fo, csize producer) const { return true; }
+
+  CODEGEN_DECL();
+};
+
+
+//fn:document-uri
+class fn_document_uri_3_0 : public function
+{
+public:
+  fn_document_uri_3_0(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+theXQueryVersion = StaticContextConsts::xquery_version_3_0;
+  }
+
+  bool mustCopyInputNodes(expr* fo, csize producer) const { return false; }
+
+  CODEGEN_DECL();
+};
+
+//fn:document-uri
+class fn_document_uri : public function
+{
+public:
+  fn_document_uri(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  bool mustCopyInputNodes(expr* fo, csize producer) const { return false; }
+
+  CODEGEN_DECL();
+};
+
+
+//fn:root
+class fn_root : public function
+{
+public:
+  fn_root(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  bool mustCopyInputNodes(expr* fo, csize producer) const { return true; }
+
+  CODEGEN_DECL();
+};
+
+
+} //namespace zorba
+
+
+#endif
+/*
+ * Local variables:
+ * mode: c++
+ * End:
+ */ 

=== modified file 'src/functions/pregenerated/func_any_uri.cpp'
--- src/functions/pregenerated/func_any_uri.cpp	2012-03-28 05:19:57 +0000
+++ src/functions/pregenerated/func_any_uri.cpp	2012-04-13 09:35:12 +0000
@@ -1,76 +1,76 @@
-/*
- * Copyright 2006-2008 The FLWOR Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- 
-// ******************************************
-// *                                        *
-// * THIS IS A GENERATED FILE. DO NOT EDIT! *
-// * SEE .xml FILE WITH SAME NAME           *
-// *                                        *
-// ******************************************
-
-
-#include "stdafx.h"
-#include "runtime/any_uri/any_uri.h"
-#include "functions/func_any_uri.h"
-
-
-namespace zorba{
-
-
-
-PlanIter_t fn_resolve_uri::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new ResolveUriIterator(sctx, loc, argv);
-}
-
-void populate_context_any_uri(static_context* sctx)
-{
-  {
-    
-
-    DECL_WITH_KIND(sctx, fn_resolve_uri,
-        (createQName("http://www.w3.org/2005/xpath-functions","","resolve-uri";), 
-        GENV_TYPESYSTEM.STRING_TYPE_QUESTION, 
-        GENV_TYPESYSTEM.ANY_URI_TYPE_QUESTION),
-        FunctionConsts::FN_RESOLVE_URI_1);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, fn_resolve_uri,
-        (createQName("http://www.w3.org/2005/xpath-functions","","resolve-uri";), 
-        GENV_TYPESYSTEM.STRING_TYPE_QUESTION, 
-        GENV_TYPESYSTEM.STRING_TYPE_ONE, 
-        GENV_TYPESYSTEM.ANY_URI_TYPE_QUESTION),
-        FunctionConsts::FN_RESOLVE_URI_2);
-
-  }
-
-}
-
-
-}
-
-
-
+/*
+ * Copyright 2006-2008 The FLWOR Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+ 
+// ******************************************
+// *                                        *
+// * THIS IS A GENERATED FILE. DO NOT EDIT! *
+// * SEE .xml FILE WITH SAME NAME           *
+// *                                        *
+// ******************************************
+
+
+#include "stdafx.h"
+#include "runtime/any_uri/any_uri.h"
+#include "functions/func_any_uri.h"
+
+
+namespace zorba{
+
+
+
+PlanIter_t fn_resolve_uri::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new ResolveUriIterator(sctx, loc, argv);
+}
+
+void populate_context_any_uri(static_context* sctx)
+{
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_resolve_uri,
+        (createQName("http://www.w3.org/2005/xpath-functions","","resolve-uri";), 
+        GENV_TYPESYSTEM.STRING_TYPE_QUESTION, 
+        GENV_TYPESYSTEM.ANY_URI_TYPE_QUESTION),
+        FunctionConsts::FN_RESOLVE_URI_1);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_resolve_uri,
+        (createQName("http://www.w3.org/2005/xpath-functions","","resolve-uri";), 
+        GENV_TYPESYSTEM.STRING_TYPE_QUESTION, 
+        GENV_TYPESYSTEM.STRING_TYPE_ONE, 
+        GENV_TYPESYSTEM.ANY_URI_TYPE_QUESTION),
+        FunctionConsts::FN_RESOLVE_URI_2);
+
+  }
+
+}
+
+
+}
+
+
+

=== modified file 'src/functions/pregenerated/func_any_uri.h'
--- src/functions/pregenerated/func_any_uri.h	2012-03-28 05:19:57 +0000
+++ src/functions/pregenerated/func_any_uri.h	2012-04-13 09:35:12 +0000
@@ -1,66 +1,66 @@
-/*
- * Copyright 2006-2008 The FLWOR Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- 
-// ******************************************
-// *                                        *
-// * THIS IS A GENERATED FILE. DO NOT EDIT! *
-// * SEE .xml FILE WITH SAME NAME           *
-// *                                        *
-// ******************************************
-
-
-#ifndef ZORBA_FUNCTIONS_ANY_URI_H
-#define ZORBA_FUNCTIONS_ANY_URI_H
-
-
-#include "common/shared_types.h"
-#include "functions/function_impl.h"
-
-
-namespace zorba {
-
-
-void populate_context_any_uri(static_context* sctx);
-
-
-
-
-//fn:resolve-uri
-class fn_resolve_uri : public function
-{
-public:
-  fn_resolve_uri(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-
-  }
-
-  bool accessesDynCtx() const { return true; }
-
-  CODEGEN_DECL();
-};
-
-
-} //namespace zorba
-
-
-#endif
-/*
- * Local variables:
- * mode: c++
- * End:
- */ 
+/*
+ * Copyright 2006-2008 The FLWOR Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+ 
+// ******************************************
+// *                                        *
+// * THIS IS A GENERATED FILE. DO NOT EDIT! *
+// * SEE .xml FILE WITH SAME NAME           *
+// *                                        *
+// ******************************************
+
+
+#ifndef ZORBA_FUNCTIONS_ANY_URI_H
+#define ZORBA_FUNCTIONS_ANY_URI_H
+
+
+#include "common/shared_types.h"
+#include "functions/function_impl.h"
+
+
+namespace zorba {
+
+
+void populate_context_any_uri(static_context* sctx);
+
+
+
+
+//fn:resolve-uri
+class fn_resolve_uri : public function
+{
+public:
+  fn_resolve_uri(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  bool accessesDynCtx() const { return true; }
+
+  CODEGEN_DECL();
+};
+
+
+} //namespace zorba
+
+
+#endif
+/*
+ * Local variables:
+ * mode: c++
+ * End:
+ */ 

=== modified file 'src/functions/pregenerated/func_base64.cpp'
--- src/functions/pregenerated/func_base64.cpp	2012-03-28 05:19:57 +0000
+++ src/functions/pregenerated/func_base64.cpp	2012-04-13 09:35:12 +0000
@@ -1,85 +1,85 @@
-/*
- * Copyright 2006-2008 The FLWOR Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- 
-// ******************************************
-// *                                        *
-// * THIS IS A GENERATED FILE. DO NOT EDIT! *
-// * SEE .xml FILE WITH SAME NAME           *
-// *                                        *
-// ******************************************
-
-
-#include "stdafx.h"
-#include "runtime/base64/base64.h"
-#include "functions/func_base64.h"
-
-
-namespace zorba{
-
-
-
-PlanIter_t fn_zorba_base64_decode::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new Base64DecodeIterator(sctx, loc, argv);
-}
-
-PlanIter_t fn_zorba_base64_encode::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new Base64EncodeIterator(sctx, loc, argv);
-}
-
-void populate_context_base64(static_context* sctx)
-{
-  {
-    
-
-    DECL_WITH_KIND(sctx, fn_zorba_base64_decode,
-        (createQName("http://www.zorba-xquery.com/modules/converters/base64","","decode";), 
-        GENV_TYPESYSTEM.BASE64BINARY_TYPE_ONE, 
-        GENV_TYPESYSTEM.STRING_TYPE_ONE),
-        FunctionConsts::FN_ZORBA_BASE64_DECODE_1);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, fn_zorba_base64_encode,
-        (createQName("http://www.zorba-xquery.com/modules/converters/base64","","encode";), 
-        GENV_TYPESYSTEM.STRING_TYPE_ONE, 
-        GENV_TYPESYSTEM.BASE64BINARY_TYPE_ONE),
-        FunctionConsts::FN_ZORBA_BASE64_ENCODE_1);
-
-  }
-
-}
-
-
-}
-
-
-
+/*
+ * Copyright 2006-2008 The FLWOR Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+ 
+// ******************************************
+// *                                        *
+// * THIS IS A GENERATED FILE. DO NOT EDIT! *
+// * SEE .xml FILE WITH SAME NAME           *
+// *                                        *
+// ******************************************
+
+
+#include "stdafx.h"
+#include "runtime/base64/base64.h"
+#include "functions/func_base64.h"
+
+
+namespace zorba{
+
+
+
+PlanIter_t fn_zorba_base64_decode::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new Base64DecodeIterator(sctx, loc, argv);
+}
+
+PlanIter_t fn_zorba_base64_encode::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new Base64EncodeIterator(sctx, loc, argv);
+}
+
+void populate_context_base64(static_context* sctx)
+{
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_zorba_base64_decode,
+        (createQName("http://www.zorba-xquery.com/modules/converters/base64","","decode";), 
+        GENV_TYPESYSTEM.BASE64BINARY_TYPE_ONE, 
+        GENV_TYPESYSTEM.STRING_TYPE_ONE),
+        FunctionConsts::FN_ZORBA_BASE64_DECODE_1);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_zorba_base64_encode,
+        (createQName("http://www.zorba-xquery.com/modules/converters/base64","","encode";), 
+        GENV_TYPESYSTEM.STRING_TYPE_ONE, 
+        GENV_TYPESYSTEM.BASE64BINARY_TYPE_ONE),
+        FunctionConsts::FN_ZORBA_BASE64_ENCODE_1);
+
+  }
+
+}
+
+
+}
+
+
+

=== modified file 'src/functions/pregenerated/func_base64.h'
--- src/functions/pregenerated/func_base64.h	2012-03-28 05:19:57 +0000
+++ src/functions/pregenerated/func_base64.h	2012-04-13 09:35:12 +0000
@@ -1,79 +1,79 @@
-/*
- * Copyright 2006-2008 The FLWOR Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- 
-// ******************************************
-// *                                        *
-// * THIS IS A GENERATED FILE. DO NOT EDIT! *
-// * SEE .xml FILE WITH SAME NAME           *
-// *                                        *
-// ******************************************
-
-
-#ifndef ZORBA_FUNCTIONS_BASE64_H
-#define ZORBA_FUNCTIONS_BASE64_H
-
-
-#include "common/shared_types.h"
-#include "functions/function_impl.h"
-
-
-namespace zorba {
-
-
-void populate_context_base64(static_context* sctx);
-
-
-
-
-//fn-zorba-base64:decode
-class fn_zorba_base64_decode : public function
-{
-public:
-  fn_zorba_base64_decode(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-
-  }
-
-  CODEGEN_DECL();
-};
-
-
-//fn-zorba-base64:encode
-class fn_zorba_base64_encode : public function
-{
-public:
-  fn_zorba_base64_encode(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-
-  }
-
-  CODEGEN_DECL();
-};
-
-
-} //namespace zorba
-
-
-#endif
-/*
- * Local variables:
- * mode: c++
- * End:
- */ 
+/*
+ * Copyright 2006-2008 The FLWOR Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+ 
+// ******************************************
+// *                                        *
+// * THIS IS A GENERATED FILE. DO NOT EDIT! *
+// * SEE .xml FILE WITH SAME NAME           *
+// *                                        *
+// ******************************************
+
+
+#ifndef ZORBA_FUNCTIONS_BASE64_H
+#define ZORBA_FUNCTIONS_BASE64_H
+
+
+#include "common/shared_types.h"
+#include "functions/function_impl.h"
+
+
+namespace zorba {
+
+
+void populate_context_base64(static_context* sctx);
+
+
+
+
+//fn-zorba-base64:decode
+class fn_zorba_base64_decode : public function
+{
+public:
+  fn_zorba_base64_decode(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  CODEGEN_DECL();
+};
+
+
+//fn-zorba-base64:encode
+class fn_zorba_base64_encode : public function
+{
+public:
+  fn_zorba_base64_encode(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  CODEGEN_DECL();
+};
+
+
+} //namespace zorba
+
+
+#endif
+/*
+ * Local variables:
+ * mode: c++
+ * End:
+ */ 

=== modified file 'src/functions/pregenerated/func_booleans.cpp'
--- src/functions/pregenerated/func_booleans.cpp	2012-03-28 05:19:57 +0000
+++ src/functions/pregenerated/func_booleans.cpp	2012-04-13 09:35:12 +0000
@@ -1,110 +1,110 @@
-/*
- * Copyright 2006-2008 The FLWOR Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- 
-// ******************************************
-// *                                        *
-// * THIS IS A GENERATED FILE. DO NOT EDIT! *
-// * SEE .xml FILE WITH SAME NAME           *
-// *                                        *
-// ******************************************
-
-
-#include "stdafx.h"
-#include "runtime/booleans/booleans.h"
-#include "functions/func_booleans.h"
-
-
-namespace zorba{
-
-
-
-PlanIter_t op_is_same_node::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new IsSameNodeIterator(sctx, loc, argv);
-}
-
-PlanIter_t op_node_before::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new NodeBeforeIterator(sctx, loc, argv);
-}
-
-PlanIter_t op_node_after::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new NodeAfterIterator(sctx, loc, argv);
-}
-
-void populate_context_booleans(static_context* sctx)
-{
-  {
-    
-
-    DECL_WITH_KIND(sctx, op_is_same_node,
-        (createQName("http://www.zorba-xquery.com/internal/xquery-ops","","is-same-node";), 
-        GENV_TYPESYSTEM.ANY_NODE_TYPE_QUESTION, 
-        GENV_TYPESYSTEM.ANY_NODE_TYPE_QUESTION, 
-        GENV_TYPESYSTEM.BOOLEAN_TYPE_QUESTION),
-        FunctionConsts::OP_IS_SAME_NODE_2);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, op_node_before,
-        (createQName("http://www.zorba-xquery.com/internal/xquery-ops","","node-before";), 
-        GENV_TYPESYSTEM.ANY_NODE_TYPE_QUESTION, 
-        GENV_TYPESYSTEM.ANY_NODE_TYPE_QUESTION, 
-        GENV_TYPESYSTEM.BOOLEAN_TYPE_QUESTION),
-        FunctionConsts::OP_NODE_BEFORE_2);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, op_node_after,
-        (createQName("http://www.zorba-xquery.com/internal/xquery-ops","","node-after";), 
-        GENV_TYPESYSTEM.ANY_NODE_TYPE_QUESTION, 
-        GENV_TYPESYSTEM.ANY_NODE_TYPE_QUESTION, 
-        GENV_TYPESYSTEM.BOOLEAN_TYPE_QUESTION),
-        FunctionConsts::OP_NODE_AFTER_2);
-
-  }
-
-}
-
-
-}
-
-
-
+/*
+ * Copyright 2006-2008 The FLWOR Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+ 
+// ******************************************
+// *                                        *
+// * THIS IS A GENERATED FILE. DO NOT EDIT! *
+// * SEE .xml FILE WITH SAME NAME           *
+// *                                        *
+// ******************************************
+
+
+#include "stdafx.h"
+#include "runtime/booleans/booleans.h"
+#include "functions/func_booleans.h"
+
+
+namespace zorba{
+
+
+
+PlanIter_t op_is_same_node::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new IsSameNodeIterator(sctx, loc, argv);
+}
+
+PlanIter_t op_node_before::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new NodeBeforeIterator(sctx, loc, argv);
+}
+
+PlanIter_t op_node_after::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new NodeAfterIterator(sctx, loc, argv);
+}
+
+void populate_context_booleans(static_context* sctx)
+{
+  {
+    
+
+    DECL_WITH_KIND(sctx, op_is_same_node,
+        (createQName("http://www.zorba-xquery.com/internal/xquery-ops","","is-same-node";), 
+        GENV_TYPESYSTEM.ANY_NODE_TYPE_QUESTION, 
+        GENV_TYPESYSTEM.ANY_NODE_TYPE_QUESTION, 
+        GENV_TYPESYSTEM.BOOLEAN_TYPE_QUESTION),
+        FunctionConsts::OP_IS_SAME_NODE_2);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, op_node_before,
+        (createQName("http://www.zorba-xquery.com/internal/xquery-ops","","node-before";), 
+        GENV_TYPESYSTEM.ANY_NODE_TYPE_QUESTION, 
+        GENV_TYPESYSTEM.ANY_NODE_TYPE_QUESTION, 
+        GENV_TYPESYSTEM.BOOLEAN_TYPE_QUESTION),
+        FunctionConsts::OP_NODE_BEFORE_2);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, op_node_after,
+        (createQName("http://www.zorba-xquery.com/internal/xquery-ops","","node-after";), 
+        GENV_TYPESYSTEM.ANY_NODE_TYPE_QUESTION, 
+        GENV_TYPESYSTEM.ANY_NODE_TYPE_QUESTION, 
+        GENV_TYPESYSTEM.BOOLEAN_TYPE_QUESTION),
+        FunctionConsts::OP_NODE_AFTER_2);
+
+  }
+
+}
+
+
+}
+
+
+

=== modified file 'src/functions/pregenerated/func_booleans.h'
--- src/functions/pregenerated/func_booleans.h	2012-03-28 05:19:57 +0000
+++ src/functions/pregenerated/func_booleans.h	2012-04-13 09:35:12 +0000
@@ -1,100 +1,100 @@
-/*
- * Copyright 2006-2008 The FLWOR Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- 
-// ******************************************
-// *                                        *
-// * THIS IS A GENERATED FILE. DO NOT EDIT! *
-// * SEE .xml FILE WITH SAME NAME           *
-// *                                        *
-// ******************************************
-
-
-#ifndef ZORBA_FUNCTIONS_BOOLEANS_H
-#define ZORBA_FUNCTIONS_BOOLEANS_H
-
-
-#include "common/shared_types.h"
-#include "functions/function_impl.h"
-
-
-namespace zorba {
-
-
-void populate_context_booleans(static_context* sctx);
-
-
-
-
-//op:is-same-node
-class op_is_same_node : public function
-{
-public:
-  op_is_same_node(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-
-  }
-
-  bool mustCopyInputNodes(expr* fo, csize producer) const { return true; }
-
-  CODEGEN_DECL();
-};
-
-
-//op:node-before
-class op_node_before : public function
-{
-public:
-  op_node_before(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-
-  }
-
-  bool mustCopyInputNodes(expr* fo, csize producer) const { return true; }
-
-  CODEGEN_DECL();
-};
-
-
-//op:node-after
-class op_node_after : public function
-{
-public:
-  op_node_after(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-
-  }
-
-  bool mustCopyInputNodes(expr* fo, csize producer) const { return true; }
-
-  CODEGEN_DECL();
-};
-
-
-} //namespace zorba
-
-
-#endif
-/*
- * Local variables:
- * mode: c++
- * End:
- */ 
+/*
+ * Copyright 2006-2008 The FLWOR Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+ 
+// ******************************************
+// *                                        *
+// * THIS IS A GENERATED FILE. DO NOT EDIT! *
+// * SEE .xml FILE WITH SAME NAME           *
+// *                                        *
+// ******************************************
+
+
+#ifndef ZORBA_FUNCTIONS_BOOLEANS_H
+#define ZORBA_FUNCTIONS_BOOLEANS_H
+
+
+#include "common/shared_types.h"
+#include "functions/function_impl.h"
+
+
+namespace zorba {
+
+
+void populate_context_booleans(static_context* sctx);
+
+
+
+
+//op:is-same-node
+class op_is_same_node : public function
+{
+public:
+  op_is_same_node(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  bool mustCopyInputNodes(expr* fo, csize producer) const { return true; }
+
+  CODEGEN_DECL();
+};
+
+
+//op:node-before
+class op_node_before : public function
+{
+public:
+  op_node_before(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  bool mustCopyInputNodes(expr* fo, csize producer) const { return true; }
+
+  CODEGEN_DECL();
+};
+
+
+//op:node-after
+class op_node_after : public function
+{
+public:
+  op_node_after(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  bool mustCopyInputNodes(expr* fo, csize producer) const { return true; }
+
+  CODEGEN_DECL();
+};
+
+
+} //namespace zorba
+
+
+#endif
+/*
+ * Local variables:
+ * mode: c++
+ * End:
+ */ 

=== 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 09:35:12 +0000
@@ -171,6 +171,16 @@
   return new DeclaredICsIterator(sctx, loc, argv);
 }
 
+PlanIter_t fn_uri_collection::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new FnURICollectionIterator(sctx, loc, argv);
+}
+
 void populate_context_collections(static_context* sctx)
 {
   {
@@ -892,6 +902,29 @@
 
   }
 
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_uri_collection,
+        (createQName("http://www.w3.org/2005/xpath-functions","","uri-collection";), 
+        GENV_TYPESYSTEM.ANY_URI_TYPE_STAR),
+        FunctionConsts::FN_URI_COLLECTION_0);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_uri_collection,
+        (createQName("http://www.w3.org/2005/xpath-functions","","uri-collection";), 
+        GENV_TYPESYSTEM.STRING_TYPE_QUESTION, 
+        GENV_TYPESYSTEM.ANY_URI_TYPE_STAR),
+        FunctionConsts::FN_URI_COLLECTION_1);
+
+  }
+
 }
 
 

=== 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 09:35:12 +0000
@@ -664,6 +664,21 @@
 };
 
 
+//fn:uri-collection
+class fn_uri_collection : public function
+{
+public:
+  fn_uri_collection(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  CODEGEN_DECL();
+};
+
+
 } //namespace zorba
 
 

=== modified file 'src/functions/pregenerated/func_context.cpp'
--- src/functions/pregenerated/func_context.cpp	2012-03-28 05:19:57 +0000
+++ src/functions/pregenerated/func_context.cpp	2012-04-13 09:35:12 +0000
@@ -1,209 +1,209 @@
-/*
- * Copyright 2006-2008 The FLWOR Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- 
-// ******************************************
-// *                                        *
-// * THIS IS A GENERATED FILE. DO NOT EDIT! *
-// * SEE .xml FILE WITH SAME NAME           *
-// *                                        *
-// ******************************************
-
-
-#include "stdafx.h"
-#include "runtime/context/context.h"
-#include "functions/func_context.h"
-
-
-namespace zorba{
-
-
-
-PlanIter_t fn_current_dateTime::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new CurrentDateTimeIterator(sctx, loc, argv);
-}
-
-PlanIter_t fn_current_date::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new CurrentDateIterator(sctx, loc, argv);
-}
-
-PlanIter_t fn_current_time::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new CurrentTimeIterator(sctx, loc, argv);
-}
-
-PlanIter_t fn_implicit_timezone::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new ImplicitTimezoneIterator(sctx, loc, argv);
-}
-
-PlanIter_t fn_default_collation::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new DefaultCollationIterator(sctx, loc, argv);
-}
-
-PlanIter_t fn_position::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return NULL;
-}
-
-PlanIter_t fn_last::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return NULL;
-}
-
-PlanIter_t fn_static_base_uri::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return NULL;
-}
-
-void populate_context_context(static_context* sctx)
-{
-  {
-    
-
-    DECL_WITH_KIND(sctx, fn_current_dateTime,
-        (createQName("http://www.w3.org/2005/xpath-functions","","current-dateTime";), 
-        GENV_TYPESYSTEM.DATETIME_TYPE_ONE),
-        FunctionConsts::FN_CURRENT_DATETIME_0);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, fn_current_date,
-        (createQName("http://www.w3.org/2005/xpath-functions","","current-date";), 
-        GENV_TYPESYSTEM.DATE_TYPE_ONE),
-        FunctionConsts::FN_CURRENT_DATE_0);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, fn_current_time,
-        (createQName("http://www.w3.org/2005/xpath-functions","","current-time";), 
-        GENV_TYPESYSTEM.TIME_TYPE_ONE),
-        FunctionConsts::FN_CURRENT_TIME_0);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, fn_implicit_timezone,
-        (createQName("http://www.w3.org/2005/xpath-functions","","implicit-timezone";), 
-        GENV_TYPESYSTEM.DT_DURATION_TYPE_ONE),
-        FunctionConsts::FN_IMPLICIT_TIMEZONE_0);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, fn_default_collation,
-        (createQName("http://www.w3.org/2005/xpath-functions","","default-collation";), 
-        GENV_TYPESYSTEM.STRING_TYPE_ONE),
-        FunctionConsts::FN_DEFAULT_COLLATION_0);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, fn_position,
-        (createQName("http://www.w3.org/2005/xpath-functions","","position";), 
-        GENV_TYPESYSTEM.INTEGER_TYPE_ONE),
-        FunctionConsts::FN_POSITION_0);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, fn_last,
-        (createQName("http://www.w3.org/2005/xpath-functions","","last";), 
-        GENV_TYPESYSTEM.INTEGER_TYPE_ONE),
-        FunctionConsts::FN_LAST_0);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, fn_static_base_uri,
-        (createQName("http://www.w3.org/2005/xpath-functions","","static-base-uri";), 
-        GENV_TYPESYSTEM.ANY_URI_TYPE_QUESTION),
-        FunctionConsts::FN_STATIC_BASE_URI_0);
-
-  }
-
-}
-
-
-}
-
-
-
+/*
+ * Copyright 2006-2008 The FLWOR Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+ 
+// ******************************************
+// *                                        *
+// * THIS IS A GENERATED FILE. DO NOT EDIT! *
+// * SEE .xml FILE WITH SAME NAME           *
+// *                                        *
+// ******************************************
+
+
+#include "stdafx.h"
+#include "runtime/context/context.h"
+#include "functions/func_context.h"
+
+
+namespace zorba{
+
+
+
+PlanIter_t fn_current_dateTime::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new CurrentDateTimeIterator(sctx, loc, argv);
+}
+
+PlanIter_t fn_current_date::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new CurrentDateIterator(sctx, loc, argv);
+}
+
+PlanIter_t fn_current_time::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new CurrentTimeIterator(sctx, loc, argv);
+}
+
+PlanIter_t fn_implicit_timezone::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new ImplicitTimezoneIterator(sctx, loc, argv);
+}
+
+PlanIter_t fn_default_collation::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new DefaultCollationIterator(sctx, loc, argv);
+}
+
+PlanIter_t fn_position::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return NULL;
+}
+
+PlanIter_t fn_last::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return NULL;
+}
+
+PlanIter_t fn_static_base_uri::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return NULL;
+}
+
+void populate_context_context(static_context* sctx)
+{
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_current_dateTime,
+        (createQName("http://www.w3.org/2005/xpath-functions","","current-dateTime";), 
+        GENV_TYPESYSTEM.DATETIME_TYPE_ONE),
+        FunctionConsts::FN_CURRENT_DATETIME_0);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_current_date,
+        (createQName("http://www.w3.org/2005/xpath-functions","","current-date";), 
+        GENV_TYPESYSTEM.DATE_TYPE_ONE),
+        FunctionConsts::FN_CURRENT_DATE_0);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_current_time,
+        (createQName("http://www.w3.org/2005/xpath-functions","","current-time";), 
+        GENV_TYPESYSTEM.TIME_TYPE_ONE),
+        FunctionConsts::FN_CURRENT_TIME_0);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_implicit_timezone,
+        (createQName("http://www.w3.org/2005/xpath-functions","","implicit-timezone";), 
+        GENV_TYPESYSTEM.DT_DURATION_TYPE_ONE),
+        FunctionConsts::FN_IMPLICIT_TIMEZONE_0);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_default_collation,
+        (createQName("http://www.w3.org/2005/xpath-functions","","default-collation";), 
+        GENV_TYPESYSTEM.STRING_TYPE_ONE),
+        FunctionConsts::FN_DEFAULT_COLLATION_0);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_position,
+        (createQName("http://www.w3.org/2005/xpath-functions","","position";), 
+        GENV_TYPESYSTEM.INTEGER_TYPE_ONE),
+        FunctionConsts::FN_POSITION_0);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_last,
+        (createQName("http://www.w3.org/2005/xpath-functions","","last";), 
+        GENV_TYPESYSTEM.INTEGER_TYPE_ONE),
+        FunctionConsts::FN_LAST_0);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_static_base_uri,
+        (createQName("http://www.w3.org/2005/xpath-functions","","static-base-uri";), 
+        GENV_TYPESYSTEM.ANY_URI_TYPE_QUESTION),
+        FunctionConsts::FN_STATIC_BASE_URI_0);
+
+  }
+
+}
+
+
+}
+
+
+

=== modified file 'src/functions/pregenerated/func_context.h'
--- src/functions/pregenerated/func_context.h	2012-03-28 05:19:57 +0000
+++ src/functions/pregenerated/func_context.h	2012-04-13 09:35:12 +0000
@@ -1,179 +1,179 @@
-/*
- * Copyright 2006-2008 The FLWOR Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- 
-// ******************************************
-// *                                        *
-// * THIS IS A GENERATED FILE. DO NOT EDIT! *
-// * SEE .xml FILE WITH SAME NAME           *
-// *                                        *
-// ******************************************
-
-
-#ifndef ZORBA_FUNCTIONS_CONTEXT_H
-#define ZORBA_FUNCTIONS_CONTEXT_H
-
-
-#include "common/shared_types.h"
-#include "functions/function_impl.h"
-
-
-namespace zorba {
-
-
-void populate_context_context(static_context* sctx);
-
-
-
-
-//fn:current-dateTime
-class fn_current_dateTime : public function
-{
-public:
-  fn_current_dateTime(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-
-  }
-
-  bool accessesDynCtx() const { return true; }
-
-  CODEGEN_DECL();
-};
-
-
-//fn:current-date
-class fn_current_date : public function
-{
-public:
-  fn_current_date(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-
-  }
-
-  bool accessesDynCtx() const { return true; }
-
-  CODEGEN_DECL();
-};
-
-
-//fn:current-time
-class fn_current_time : public function
-{
-public:
-  fn_current_time(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-
-  }
-
-  bool accessesDynCtx() const { return true; }
-
-  CODEGEN_DECL();
-};
-
-
-//fn:implicit-timezone
-class fn_implicit_timezone : public function
-{
-public:
-  fn_implicit_timezone(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-
-  }
-
-  bool accessesDynCtx() const { return true; }
-
-  CODEGEN_DECL();
-};
-
-
-//fn:default-collation
-class fn_default_collation : public function
-{
-public:
-  fn_default_collation(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-
-  }
-
-  bool accessesDynCtx() const { return true; }
-
-  CODEGEN_DECL();
-};
-
-
-//fn:position
-class fn_position : public function
-{
-public:
-  fn_position(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-
-  }
-
-  CODEGEN_DECL();
-};
-
-
-//fn:last
-class fn_last : public function
-{
-public:
-  fn_last(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-
-  }
-
-  CODEGEN_DECL();
-};
-
-
-//fn:static-base-uri
-class fn_static_base_uri : public function
-{
-public:
-  fn_static_base_uri(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-
-  }
-
-  CODEGEN_DECL();
-};
-
-
-} //namespace zorba
-
-
-#endif
-/*
- * Local variables:
- * mode: c++
- * End:
- */ 
+/*
+ * Copyright 2006-2008 The FLWOR Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+ 
+// ******************************************
+// *                                        *
+// * THIS IS A GENERATED FILE. DO NOT EDIT! *
+// * SEE .xml FILE WITH SAME NAME           *
+// *                                        *
+// ******************************************
+
+
+#ifndef ZORBA_FUNCTIONS_CONTEXT_H
+#define ZORBA_FUNCTIONS_CONTEXT_H
+
+
+#include "common/shared_types.h"
+#include "functions/function_impl.h"
+
+
+namespace zorba {
+
+
+void populate_context_context(static_context* sctx);
+
+
+
+
+//fn:current-dateTime
+class fn_current_dateTime : public function
+{
+public:
+  fn_current_dateTime(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  bool accessesDynCtx() const { return true; }
+
+  CODEGEN_DECL();
+};
+
+
+//fn:current-date
+class fn_current_date : public function
+{
+public:
+  fn_current_date(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  bool accessesDynCtx() const { return true; }
+
+  CODEGEN_DECL();
+};
+
+
+//fn:current-time
+class fn_current_time : public function
+{
+public:
+  fn_current_time(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  bool accessesDynCtx() const { return true; }
+
+  CODEGEN_DECL();
+};
+
+
+//fn:implicit-timezone
+class fn_implicit_timezone : public function
+{
+public:
+  fn_implicit_timezone(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  bool accessesDynCtx() const { return true; }
+
+  CODEGEN_DECL();
+};
+
+
+//fn:default-collation
+class fn_default_collation : public function
+{
+public:
+  fn_default_collation(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  bool accessesDynCtx() const { return true; }
+
+  CODEGEN_DECL();
+};
+
+
+//fn:position
+class fn_position : public function
+{
+public:
+  fn_position(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  CODEGEN_DECL();
+};
+
+
+//fn:last
+class fn_last : public function
+{
+public:
+  fn_last(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  CODEGEN_DECL();
+};
+
+
+//fn:static-base-uri
+class fn_static_base_uri : public function
+{
+public:
+  fn_static_base_uri(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  CODEGEN_DECL();
+};
+
+
+} //namespace zorba
+
+
+#endif
+/*
+ * Local variables:
+ * mode: c++
+ * End:
+ */ 

=== modified file 'src/functions/pregenerated/func_debug_iterator.cpp'
--- src/functions/pregenerated/func_debug_iterator.cpp	2012-03-28 05:19:57 +0000
+++ src/functions/pregenerated/func_debug_iterator.cpp	2012-04-13 09:35:12 +0000
@@ -1,41 +1,41 @@
-/*
- * Copyright 2006-2008 The FLWOR Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- 
-// ******************************************
-// *                                        *
-// * THIS IS A GENERATED FILE. DO NOT EDIT! *
-// * SEE .xml FILE WITH SAME NAME           *
-// *                                        *
-// ******************************************
-
-
-#include "stdafx.h"
-#include "runtime/debug/debug_iterator.h"
-#include "functions/func_debug_iterator.h"
-
-
-namespace zorba{
-
-
-
-void populate_context_debug_iterator(static_context* sctx)
-{}
-
-
-}
-
-
-
+/*
+ * Copyright 2006-2008 The FLWOR Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+ 
+// ******************************************
+// *                                        *
+// * THIS IS A GENERATED FILE. DO NOT EDIT! *
+// * SEE .xml FILE WITH SAME NAME           *
+// *                                        *
+// ******************************************
+
+
+#include "stdafx.h"
+#include "runtime/debug/debug_iterator.h"
+#include "functions/func_debug_iterator.h"
+
+
+namespace zorba{
+
+
+
+void populate_context_debug_iterator(static_context* sctx)
+{}
+
+
+}
+
+
+

=== modified file 'src/functions/pregenerated/func_debug_iterator.h'
--- src/functions/pregenerated/func_debug_iterator.h	2012-03-28 05:19:57 +0000
+++ src/functions/pregenerated/func_debug_iterator.h	2012-04-13 09:35:12 +0000
@@ -1,50 +1,50 @@
-/*
- * Copyright 2006-2008 The FLWOR Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- 
-// ******************************************
-// *                                        *
-// * THIS IS A GENERATED FILE. DO NOT EDIT! *
-// * SEE .xml FILE WITH SAME NAME           *
-// *                                        *
-// ******************************************
-
-
-#ifndef ZORBA_FUNCTIONS_DEBUG_ITERATOR_H
-#define ZORBA_FUNCTIONS_DEBUG_ITERATOR_H
-
-
-#include "common/shared_types.h"
-#include "functions/function_impl.h"
-
-
-namespace zorba {
-
-
-void populate_context_debug_iterator(static_context* sctx);
-
-
-
-
-
-} //namespace zorba
-
-
-#endif
-/*
- * Local variables:
- * mode: c++
- * End:
- */ 
+/*
+ * Copyright 2006-2008 The FLWOR Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+ 
+// ******************************************
+// *                                        *
+// * THIS IS A GENERATED FILE. DO NOT EDIT! *
+// * SEE .xml FILE WITH SAME NAME           *
+// *                                        *
+// ******************************************
+
+
+#ifndef ZORBA_FUNCTIONS_DEBUG_ITERATOR_H
+#define ZORBA_FUNCTIONS_DEBUG_ITERATOR_H
+
+
+#include "common/shared_types.h"
+#include "functions/function_impl.h"
+
+
+namespace zorba {
+
+
+void populate_context_debug_iterator(static_context* sctx);
+
+
+
+
+
+} //namespace zorba
+
+
+#endif
+/*
+ * Local variables:
+ * mode: c++
+ * End:
+ */ 

=== modified file 'src/functions/pregenerated/func_documents.cpp'
--- src/functions/pregenerated/func_documents.cpp	2012-03-28 05:19:57 +0000
+++ src/functions/pregenerated/func_documents.cpp	2012-04-13 09:35:12 +0000
@@ -1,151 +1,151 @@
-/*
- * Copyright 2006-2008 The FLWOR Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- 
-// ******************************************
-// *                                        *
-// * THIS IS A GENERATED FILE. DO NOT EDIT! *
-// * SEE .xml FILE WITH SAME NAME           *
-// *                                        *
-// ******************************************
-
-
-#include "stdafx.h"
-#include "runtime/store/documents.h"
-#include "functions/func_documents.h"
-
-
-namespace zorba{
-
-
-
-PlanIter_t zorba_store_documents_put::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new PutDocumentIterator(sctx, loc, argv);
-}
-
-PlanIter_t zorba_store_documents_remove::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new RemoveDocumentIterator(sctx, loc, argv);
-}
-
-PlanIter_t zorba_store_documents_document::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new RetrieveDocumentIterator(sctx, loc, argv);
-}
-
-PlanIter_t zorba_store_documents_available_documents::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new AvailableDocumentsIterator(sctx, loc, argv);
-}
-
-PlanIter_t zorba_store_documents_is_available_document::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new IsAvailableDocumentIterator(sctx, loc, argv);
-}
-
-void populate_context_documents(static_context* sctx)
-{
-  {
-    
-
-    DECL_WITH_KIND(sctx, zorba_store_documents_put,
-        (createQName("http://www.zorba-xquery.com/modules/store/dynamic/documents","","put";), 
-        GENV_TYPESYSTEM.STRING_TYPE_ONE, 
-        GENV_TYPESYSTEM.DOCUMENT_TYPE_ONE, 
-        GENV_TYPESYSTEM.EMPTY_TYPE),
-        FunctionConsts::ZORBA_STORE_DOCUMENTS_PUT_2);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, zorba_store_documents_remove,
-        (createQName("http://www.zorba-xquery.com/modules/store/dynamic/documents","","remove";), 
-        GENV_TYPESYSTEM.STRING_TYPE_ONE, 
-        GENV_TYPESYSTEM.EMPTY_TYPE),
-        FunctionConsts::ZORBA_STORE_DOCUMENTS_REMOVE_1);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, zorba_store_documents_document,
-        (createQName("http://www.zorba-xquery.com/modules/store/dynamic/documents","","document";), 
-        GENV_TYPESYSTEM.STRING_TYPE_ONE, 
-        GENV_TYPESYSTEM.DOCUMENT_TYPE_ONE),
-        FunctionConsts::ZORBA_STORE_DOCUMENTS_DOCUMENT_1);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, zorba_store_documents_available_documents,
-        (createQName("http://www.zorba-xquery.com/modules/store/dynamic/documents","","available-documents";), 
-        GENV_TYPESYSTEM.STRING_TYPE_STAR),
-        FunctionConsts::ZORBA_STORE_DOCUMENTS_AVAILABLE_DOCUMENTS_0);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, zorba_store_documents_is_available_document,
-        (createQName("http://www.zorba-xquery.com/modules/store/dynamic/documents","","is-available-document";), 
-        GENV_TYPESYSTEM.STRING_TYPE_ONE, 
-        GENV_TYPESYSTEM.BOOLEAN_TYPE_ONE),
-        FunctionConsts::ZORBA_STORE_DOCUMENTS_IS_AVAILABLE_DOCUMENT_1);
-
-  }
-
-}
-
-
-}
-
-
-
+/*
+ * Copyright 2006-2008 The FLWOR Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+ 
+// ******************************************
+// *                                        *
+// * THIS IS A GENERATED FILE. DO NOT EDIT! *
+// * SEE .xml FILE WITH SAME NAME           *
+// *                                        *
+// ******************************************
+
+
+#include "stdafx.h"
+#include "runtime/store/documents.h"
+#include "functions/func_documents.h"
+
+
+namespace zorba{
+
+
+
+PlanIter_t zorba_store_documents_put::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new PutDocumentIterator(sctx, loc, argv);
+}
+
+PlanIter_t zorba_store_documents_remove::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new RemoveDocumentIterator(sctx, loc, argv);
+}
+
+PlanIter_t zorba_store_documents_document::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new RetrieveDocumentIterator(sctx, loc, argv);
+}
+
+PlanIter_t zorba_store_documents_available_documents::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new AvailableDocumentsIterator(sctx, loc, argv);
+}
+
+PlanIter_t zorba_store_documents_is_available_document::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new IsAvailableDocumentIterator(sctx, loc, argv);
+}
+
+void populate_context_documents(static_context* sctx)
+{
+  {
+    
+
+    DECL_WITH_KIND(sctx, zorba_store_documents_put,
+        (createQName("http://www.zorba-xquery.com/modules/store/dynamic/documents","","put";), 
+        GENV_TYPESYSTEM.STRING_TYPE_ONE, 
+        GENV_TYPESYSTEM.DOCUMENT_TYPE_ONE, 
+        GENV_TYPESYSTEM.EMPTY_TYPE),
+        FunctionConsts::ZORBA_STORE_DOCUMENTS_PUT_2);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, zorba_store_documents_remove,
+        (createQName("http://www.zorba-xquery.com/modules/store/dynamic/documents","","remove";), 
+        GENV_TYPESYSTEM.STRING_TYPE_ONE, 
+        GENV_TYPESYSTEM.EMPTY_TYPE),
+        FunctionConsts::ZORBA_STORE_DOCUMENTS_REMOVE_1);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, zorba_store_documents_document,
+        (createQName("http://www.zorba-xquery.com/modules/store/dynamic/documents","","document";), 
+        GENV_TYPESYSTEM.STRING_TYPE_ONE, 
+        GENV_TYPESYSTEM.DOCUMENT_TYPE_ONE),
+        FunctionConsts::ZORBA_STORE_DOCUMENTS_DOCUMENT_1);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, zorba_store_documents_available_documents,
+        (createQName("http://www.zorba-xquery.com/modules/store/dynamic/documents","","available-documents";), 
+        GENV_TYPESYSTEM.STRING_TYPE_STAR),
+        FunctionConsts::ZORBA_STORE_DOCUMENTS_AVAILABLE_DOCUMENTS_0);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, zorba_store_documents_is_available_document,
+        (createQName("http://www.zorba-xquery.com/modules/store/dynamic/documents","","is-available-document";), 
+        GENV_TYPESYSTEM.STRING_TYPE_ONE, 
+        GENV_TYPESYSTEM.BOOLEAN_TYPE_ONE),
+        FunctionConsts::ZORBA_STORE_DOCUMENTS_IS_AVAILABLE_DOCUMENT_1);
+
+  }
+
+}
+
+
+}
+
+
+

=== modified file 'src/functions/pregenerated/func_documents.h'
--- src/functions/pregenerated/func_documents.h	2012-03-28 05:19:57 +0000
+++ src/functions/pregenerated/func_documents.h	2012-04-13 09:35:12 +0000
@@ -1,140 +1,140 @@
-/*
- * Copyright 2006-2008 The FLWOR Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- 
-// ******************************************
-// *                                        *
-// * THIS IS A GENERATED FILE. DO NOT EDIT! *
-// * SEE .xml FILE WITH SAME NAME           *
-// *                                        *
-// ******************************************
-
-
-#ifndef ZORBA_FUNCTIONS_DOCUMENTS_H
-#define ZORBA_FUNCTIONS_DOCUMENTS_H
-
-
-#include "common/shared_types.h"
-#include "functions/function_impl.h"
-
-
-namespace zorba {
-
-
-void populate_context_documents(static_context* sctx);
-
-
-
-
-//zorba-store-documents:put
-class zorba_store_documents_put : public function
-{
-public:
-  zorba_store_documents_put(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-
-  }
-
-  short getScriptingKind() const { return UPDATING_EXPR; }
-
-  bool accessesDynCtx() const { return true; }
-
-  bool mustCopyInputNodes(expr* fo, csize producer) const { return producer == 1; }
-
-  CODEGEN_DECL();
-};
-
-
-//zorba-store-documents:remove
-class zorba_store_documents_remove : public function
-{
-public:
-  zorba_store_documents_remove(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-
-  }
-
-  short getScriptingKind() const { return UPDATING_EXPR; }
-
-  bool accessesDynCtx() const { return true; }
-
-  CODEGEN_DECL();
-};
-
-
-//zorba-store-documents:document
-class zorba_store_documents_document : public function
-{
-public:
-  zorba_store_documents_document(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-
-  }
-
-  bool accessesDynCtx() const { return true; }
-
-  CODEGEN_DECL();
-};
-
-
-//zorba-store-documents:available-documents
-class zorba_store_documents_available_documents : public function
-{
-public:
-  zorba_store_documents_available_documents(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-
-  }
-
-  bool accessesDynCtx() const { return true; }
-
-  CODEGEN_DECL();
-};
-
-
-//zorba-store-documents:is-available-document
-class zorba_store_documents_is_available_document : public function
-{
-public:
-  zorba_store_documents_is_available_document(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-
-  }
-
-  bool accessesDynCtx() const { return true; }
-
-  CODEGEN_DECL();
-};
-
-
-} //namespace zorba
-
-
-#endif
-/*
- * Local variables:
- * mode: c++
- * End:
- */ 
+/*
+ * Copyright 2006-2008 The FLWOR Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+ 
+// ******************************************
+// *                                        *
+// * THIS IS A GENERATED FILE. DO NOT EDIT! *
+// * SEE .xml FILE WITH SAME NAME           *
+// *                                        *
+// ******************************************
+
+
+#ifndef ZORBA_FUNCTIONS_DOCUMENTS_H
+#define ZORBA_FUNCTIONS_DOCUMENTS_H
+
+
+#include "common/shared_types.h"
+#include "functions/function_impl.h"
+
+
+namespace zorba {
+
+
+void populate_context_documents(static_context* sctx);
+
+
+
+
+//zorba-store-documents:put
+class zorba_store_documents_put : public function
+{
+public:
+  zorba_store_documents_put(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  short getScriptingKind() const { return UPDATING_EXPR; }
+
+  bool accessesDynCtx() const { return true; }
+
+  bool mustCopyInputNodes(expr* fo, csize producer) const { return producer == 1; }
+
+  CODEGEN_DECL();
+};
+
+
+//zorba-store-documents:remove
+class zorba_store_documents_remove : public function
+{
+public:
+  zorba_store_documents_remove(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  short getScriptingKind() const { return UPDATING_EXPR; }
+
+  bool accessesDynCtx() const { return true; }
+
+  CODEGEN_DECL();
+};
+
+
+//zorba-store-documents:document
+class zorba_store_documents_document : public function
+{
+public:
+  zorba_store_documents_document(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  bool accessesDynCtx() const { return true; }
+
+  CODEGEN_DECL();
+};
+
+
+//zorba-store-documents:available-documents
+class zorba_store_documents_available_documents : public function
+{
+public:
+  zorba_store_documents_available_documents(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  bool accessesDynCtx() const { return true; }
+
+  CODEGEN_DECL();
+};
+
+
+//zorba-store-documents:is-available-document
+class zorba_store_documents_is_available_document : public function
+{
+public:
+  zorba_store_documents_is_available_document(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  bool accessesDynCtx() const { return true; }
+
+  CODEGEN_DECL();
+};
+
+
+} //namespace zorba
+
+
+#endif
+/*
+ * Local variables:
+ * mode: c++
+ * End:
+ */ 

=== modified file 'src/functions/pregenerated/func_durations_dates_times.cpp'
--- src/functions/pregenerated/func_durations_dates_times.cpp	2012-03-28 23:58:23 +0000
+++ src/functions/pregenerated/func_durations_dates_times.cpp	2012-04-13 09:35:12 +0000
@@ -1,503 +1,503 @@
-/*
- * Copyright 2006-2008 The FLWOR Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- 
-// ******************************************
-// *                                        *
-// * THIS IS A GENERATED FILE. DO NOT EDIT! *
-// * SEE .xml FILE WITH SAME NAME           *
-// *                                        *
-// ******************************************
-
-
-#include "stdafx.h"
-#include "runtime/durations_dates_times/durations_dates_times.h"
-#include "functions/func_durations_dates_times.h"
-
-
-namespace zorba{
-
-
-
-PlanIter_t fn_years_from_duration::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new YearsFromDurationIterator(sctx, loc, argv);
-}
-
-PlanIter_t fn_months_from_duration::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new MonthsFromDurationIterator(sctx, loc, argv);
-}
-
-PlanIter_t fn_days_from_duration::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new DaysFromDurationIterator(sctx, loc, argv);
-}
-
-PlanIter_t fn_hours_from_duration::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new HoursFromDurationIterator(sctx, loc, argv);
-}
-
-PlanIter_t fn_minutes_from_duration::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new MinutesFromDurationIterator(sctx, loc, argv);
-}
-
-PlanIter_t fn_seconds_from_duration::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new SecondsFromDurationIterator(sctx, loc, argv);
-}
-
-PlanIter_t fn_year_from_dateTime::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new YearFromDatetimeIterator(sctx, loc, argv);
-}
-
-PlanIter_t fn_month_from_dateTime::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new MonthFromDatetimeIterator(sctx, loc, argv);
-}
-
-PlanIter_t fn_day_from_dateTime::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new DayFromDatetimeIterator(sctx, loc, argv);
-}
-
-PlanIter_t fn_hours_from_dateTime::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new HoursFromDatetimeIterator(sctx, loc, argv);
-}
-
-PlanIter_t fn_minutes_from_dateTime::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new MinutesFromDatetimeIterator(sctx, loc, argv);
-}
-
-PlanIter_t fn_seconds_from_dateTime::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new SecondsFromDatetimeIterator(sctx, loc, argv);
-}
-
-PlanIter_t fn_timezone_from_dateTime::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new TimezoneFromDatetimeIterator(sctx, loc, argv);
-}
-
-PlanIter_t fn_year_from_date::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new YearFromDateIterator(sctx, loc, argv);
-}
-
-PlanIter_t fn_month_from_date::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new MonthFromDateIterator(sctx, loc, argv);
-}
-
-PlanIter_t fn_day_from_date::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new DayFromDateIterator(sctx, loc, argv);
-}
-
-PlanIter_t fn_timezone_from_date::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new TimezoneFromDateIterator(sctx, loc, argv);
-}
-
-PlanIter_t fn_hours_from_time::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new HoursFromTimeIterator(sctx, loc, argv);
-}
-
-PlanIter_t fn_minutes_from_time::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new MinutesFromTimeIterator(sctx, loc, argv);
-}
-
-PlanIter_t fn_seconds_from_time::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new SecondsFromTimeIterator(sctx, loc, argv);
-}
-
-PlanIter_t fn_timezone_from_time::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new TimezoneFromTimeIterator(sctx, loc, argv);
-}
-
-void populate_context_durations_dates_times(static_context* sctx)
-{
-  {
-    
-
-    DECL_WITH_KIND(sctx, fn_years_from_duration,
-        (createQName("http://www.w3.org/2005/xpath-functions","","years-from-duration";), 
-        GENV_TYPESYSTEM.DURATION_TYPE_QUESTION, 
-        GENV_TYPESYSTEM.INTEGER_TYPE_QUESTION),
-        FunctionConsts::FN_YEARS_FROM_DURATION_1);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, fn_months_from_duration,
-        (createQName("http://www.w3.org/2005/xpath-functions","","months-from-duration";), 
-        GENV_TYPESYSTEM.DURATION_TYPE_QUESTION, 
-        GENV_TYPESYSTEM.INTEGER_TYPE_QUESTION),
-        FunctionConsts::FN_MONTHS_FROM_DURATION_1);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, fn_days_from_duration,
-        (createQName("http://www.w3.org/2005/xpath-functions","","days-from-duration";), 
-        GENV_TYPESYSTEM.DURATION_TYPE_QUESTION, 
-        GENV_TYPESYSTEM.INTEGER_TYPE_QUESTION),
-        FunctionConsts::FN_DAYS_FROM_DURATION_1);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, fn_hours_from_duration,
-        (createQName("http://www.w3.org/2005/xpath-functions","","hours-from-duration";), 
-        GENV_TYPESYSTEM.DURATION_TYPE_QUESTION, 
-        GENV_TYPESYSTEM.INTEGER_TYPE_QUESTION),
-        FunctionConsts::FN_HOURS_FROM_DURATION_1);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, fn_minutes_from_duration,
-        (createQName("http://www.w3.org/2005/xpath-functions","","minutes-from-duration";), 
-        GENV_TYPESYSTEM.DURATION_TYPE_QUESTION, 
-        GENV_TYPESYSTEM.INTEGER_TYPE_QUESTION),
-        FunctionConsts::FN_MINUTES_FROM_DURATION_1);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, fn_seconds_from_duration,
-        (createQName("http://www.w3.org/2005/xpath-functions","","seconds-from-duration";), 
-        GENV_TYPESYSTEM.DURATION_TYPE_QUESTION, 
-        GENV_TYPESYSTEM.DECIMAL_TYPE_QUESTION),
-        FunctionConsts::FN_SECONDS_FROM_DURATION_1);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, fn_year_from_dateTime,
-        (createQName("http://www.w3.org/2005/xpath-functions","","year-from-dateTime";), 
-        GENV_TYPESYSTEM.DATETIME_TYPE_QUESTION, 
-        GENV_TYPESYSTEM.INTEGER_TYPE_QUESTION),
-        FunctionConsts::FN_YEAR_FROM_DATETIME_1);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, fn_month_from_dateTime,
-        (createQName("http://www.w3.org/2005/xpath-functions","","month-from-dateTime";), 
-        GENV_TYPESYSTEM.DATETIME_TYPE_QUESTION, 
-        GENV_TYPESYSTEM.INTEGER_TYPE_QUESTION),
-        FunctionConsts::FN_MONTH_FROM_DATETIME_1);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, fn_day_from_dateTime,
-        (createQName("http://www.w3.org/2005/xpath-functions","","day-from-dateTime";), 
-        GENV_TYPESYSTEM.DATETIME_TYPE_QUESTION, 
-        GENV_TYPESYSTEM.INTEGER_TYPE_QUESTION),
-        FunctionConsts::FN_DAY_FROM_DATETIME_1);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, fn_hours_from_dateTime,
-        (createQName("http://www.w3.org/2005/xpath-functions","","hours-from-dateTime";), 
-        GENV_TYPESYSTEM.DATETIME_TYPE_QUESTION, 
-        GENV_TYPESYSTEM.INTEGER_TYPE_QUESTION),
-        FunctionConsts::FN_HOURS_FROM_DATETIME_1);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, fn_minutes_from_dateTime,
-        (createQName("http://www.w3.org/2005/xpath-functions","","minutes-from-dateTime";), 
-        GENV_TYPESYSTEM.DATETIME_TYPE_QUESTION, 
-        GENV_TYPESYSTEM.INTEGER_TYPE_QUESTION),
-        FunctionConsts::FN_MINUTES_FROM_DATETIME_1);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, fn_seconds_from_dateTime,
-        (createQName("http://www.w3.org/2005/xpath-functions","","seconds-from-dateTime";), 
-        GENV_TYPESYSTEM.DATETIME_TYPE_QUESTION, 
-        GENV_TYPESYSTEM.DECIMAL_TYPE_QUESTION),
-        FunctionConsts::FN_SECONDS_FROM_DATETIME_1);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, fn_timezone_from_dateTime,
-        (createQName("http://www.w3.org/2005/xpath-functions","","timezone-from-dateTime";), 
-        GENV_TYPESYSTEM.DATETIME_TYPE_QUESTION, 
-        GENV_TYPESYSTEM.DT_DURATION_TYPE_QUESTION),
-        FunctionConsts::FN_TIMEZONE_FROM_DATETIME_1);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, fn_year_from_date,
-        (createQName("http://www.w3.org/2005/xpath-functions","","year-from-date";), 
-        GENV_TYPESYSTEM.DATE_TYPE_QUESTION, 
-        GENV_TYPESYSTEM.INTEGER_TYPE_QUESTION),
-        FunctionConsts::FN_YEAR_FROM_DATE_1);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, fn_month_from_date,
-        (createQName("http://www.w3.org/2005/xpath-functions","","month-from-date";), 
-        GENV_TYPESYSTEM.DATE_TYPE_QUESTION, 
-        GENV_TYPESYSTEM.INTEGER_TYPE_QUESTION),
-        FunctionConsts::FN_MONTH_FROM_DATE_1);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, fn_day_from_date,
-        (createQName("http://www.w3.org/2005/xpath-functions","","day-from-date";), 
-        GENV_TYPESYSTEM.DATE_TYPE_QUESTION, 
-        GENV_TYPESYSTEM.INTEGER_TYPE_QUESTION),
-        FunctionConsts::FN_DAY_FROM_DATE_1);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, fn_timezone_from_date,
-        (createQName("http://www.w3.org/2005/xpath-functions","","timezone-from-date";), 
-        GENV_TYPESYSTEM.DATE_TYPE_QUESTION, 
-        GENV_TYPESYSTEM.DT_DURATION_TYPE_QUESTION),
-        FunctionConsts::FN_TIMEZONE_FROM_DATE_1);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, fn_hours_from_time,
-        (createQName("http://www.w3.org/2005/xpath-functions","","hours-from-time";), 
-        GENV_TYPESYSTEM.TIME_TYPE_QUESTION, 
-        GENV_TYPESYSTEM.INTEGER_TYPE_QUESTION),
-        FunctionConsts::FN_HOURS_FROM_TIME_1);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, fn_minutes_from_time,
-        (createQName("http://www.w3.org/2005/xpath-functions","","minutes-from-time";), 
-        GENV_TYPESYSTEM.TIME_TYPE_QUESTION, 
-        GENV_TYPESYSTEM.INTEGER_TYPE_QUESTION),
-        FunctionConsts::FN_MINUTES_FROM_TIME_1);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, fn_seconds_from_time,
-        (createQName("http://www.w3.org/2005/xpath-functions","","seconds-from-time";), 
-        GENV_TYPESYSTEM.TIME_TYPE_QUESTION, 
-        GENV_TYPESYSTEM.DECIMAL_TYPE_QUESTION),
-        FunctionConsts::FN_SECONDS_FROM_TIME_1);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, fn_timezone_from_time,
-        (createQName("http://www.w3.org/2005/xpath-functions","","timezone-from-time";), 
-        GENV_TYPESYSTEM.TIME_TYPE_QUESTION, 
-        GENV_TYPESYSTEM.DT_DURATION_TYPE_QUESTION),
-        FunctionConsts::FN_TIMEZONE_FROM_TIME_1);
-
-  }
-
-}
-
-
-}
-
-
-
+/*
+ * Copyright 2006-2008 The FLWOR Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+ 
+// ******************************************
+// *                                        *
+// * THIS IS A GENERATED FILE. DO NOT EDIT! *
+// * SEE .xml FILE WITH SAME NAME           *
+// *                                        *
+// ******************************************
+
+
+#include "stdafx.h"
+#include "runtime/durations_dates_times/durations_dates_times.h"
+#include "functions/func_durations_dates_times.h"
+
+
+namespace zorba{
+
+
+
+PlanIter_t fn_years_from_duration::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new YearsFromDurationIterator(sctx, loc, argv);
+}
+
+PlanIter_t fn_months_from_duration::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new MonthsFromDurationIterator(sctx, loc, argv);
+}
+
+PlanIter_t fn_days_from_duration::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new DaysFromDurationIterator(sctx, loc, argv);
+}
+
+PlanIter_t fn_hours_from_duration::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new HoursFromDurationIterator(sctx, loc, argv);
+}
+
+PlanIter_t fn_minutes_from_duration::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new MinutesFromDurationIterator(sctx, loc, argv);
+}
+
+PlanIter_t fn_seconds_from_duration::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new SecondsFromDurationIterator(sctx, loc, argv);
+}
+
+PlanIter_t fn_year_from_dateTime::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new YearFromDatetimeIterator(sctx, loc, argv);
+}
+
+PlanIter_t fn_month_from_dateTime::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new MonthFromDatetimeIterator(sctx, loc, argv);
+}
+
+PlanIter_t fn_day_from_dateTime::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new DayFromDatetimeIterator(sctx, loc, argv);
+}
+
+PlanIter_t fn_hours_from_dateTime::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new HoursFromDatetimeIterator(sctx, loc, argv);
+}
+
+PlanIter_t fn_minutes_from_dateTime::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new MinutesFromDatetimeIterator(sctx, loc, argv);
+}
+
+PlanIter_t fn_seconds_from_dateTime::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new SecondsFromDatetimeIterator(sctx, loc, argv);
+}
+
+PlanIter_t fn_timezone_from_dateTime::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new TimezoneFromDatetimeIterator(sctx, loc, argv);
+}
+
+PlanIter_t fn_year_from_date::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new YearFromDateIterator(sctx, loc, argv);
+}
+
+PlanIter_t fn_month_from_date::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new MonthFromDateIterator(sctx, loc, argv);
+}
+
+PlanIter_t fn_day_from_date::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new DayFromDateIterator(sctx, loc, argv);
+}
+
+PlanIter_t fn_timezone_from_date::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new TimezoneFromDateIterator(sctx, loc, argv);
+}
+
+PlanIter_t fn_hours_from_time::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new HoursFromTimeIterator(sctx, loc, argv);
+}
+
+PlanIter_t fn_minutes_from_time::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new MinutesFromTimeIterator(sctx, loc, argv);
+}
+
+PlanIter_t fn_seconds_from_time::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new SecondsFromTimeIterator(sctx, loc, argv);
+}
+
+PlanIter_t fn_timezone_from_time::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new TimezoneFromTimeIterator(sctx, loc, argv);
+}
+
+void populate_context_durations_dates_times(static_context* sctx)
+{
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_years_from_duration,
+        (createQName("http://www.w3.org/2005/xpath-functions","","years-from-duration";), 
+        GENV_TYPESYSTEM.DURATION_TYPE_QUESTION, 
+        GENV_TYPESYSTEM.INTEGER_TYPE_QUESTION),
+        FunctionConsts::FN_YEARS_FROM_DURATION_1);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_months_from_duration,
+        (createQName("http://www.w3.org/2005/xpath-functions","","months-from-duration";), 
+        GENV_TYPESYSTEM.DURATION_TYPE_QUESTION, 
+        GENV_TYPESYSTEM.INTEGER_TYPE_QUESTION),
+        FunctionConsts::FN_MONTHS_FROM_DURATION_1);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_days_from_duration,
+        (createQName("http://www.w3.org/2005/xpath-functions","","days-from-duration";), 
+        GENV_TYPESYSTEM.DURATION_TYPE_QUESTION, 
+        GENV_TYPESYSTEM.INTEGER_TYPE_QUESTION),
+        FunctionConsts::FN_DAYS_FROM_DURATION_1);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_hours_from_duration,
+        (createQName("http://www.w3.org/2005/xpath-functions","","hours-from-duration";), 
+        GENV_TYPESYSTEM.DURATION_TYPE_QUESTION, 
+        GENV_TYPESYSTEM.INTEGER_TYPE_QUESTION),
+        FunctionConsts::FN_HOURS_FROM_DURATION_1);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_minutes_from_duration,
+        (createQName("http://www.w3.org/2005/xpath-functions","","minutes-from-duration";), 
+        GENV_TYPESYSTEM.DURATION_TYPE_QUESTION, 
+        GENV_TYPESYSTEM.INTEGER_TYPE_QUESTION),
+        FunctionConsts::FN_MINUTES_FROM_DURATION_1);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_seconds_from_duration,
+        (createQName("http://www.w3.org/2005/xpath-functions","","seconds-from-duration";), 
+        GENV_TYPESYSTEM.DURATION_TYPE_QUESTION, 
+        GENV_TYPESYSTEM.DECIMAL_TYPE_QUESTION),
+        FunctionConsts::FN_SECONDS_FROM_DURATION_1);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_year_from_dateTime,
+        (createQName("http://www.w3.org/2005/xpath-functions","","year-from-dateTime";), 
+        GENV_TYPESYSTEM.DATETIME_TYPE_QUESTION, 
+        GENV_TYPESYSTEM.INTEGER_TYPE_QUESTION),
+        FunctionConsts::FN_YEAR_FROM_DATETIME_1);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_month_from_dateTime,
+        (createQName("http://www.w3.org/2005/xpath-functions","","month-from-dateTime";), 
+        GENV_TYPESYSTEM.DATETIME_TYPE_QUESTION, 
+        GENV_TYPESYSTEM.INTEGER_TYPE_QUESTION),
+        FunctionConsts::FN_MONTH_FROM_DATETIME_1);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_day_from_dateTime,
+        (createQName("http://www.w3.org/2005/xpath-functions","","day-from-dateTime";), 
+        GENV_TYPESYSTEM.DATETIME_TYPE_QUESTION, 
+        GENV_TYPESYSTEM.INTEGER_TYPE_QUESTION),
+        FunctionConsts::FN_DAY_FROM_DATETIME_1);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_hours_from_dateTime,
+        (createQName("http://www.w3.org/2005/xpath-functions","","hours-from-dateTime";), 
+        GENV_TYPESYSTEM.DATETIME_TYPE_QUESTION, 
+        GENV_TYPESYSTEM.INTEGER_TYPE_QUESTION),
+        FunctionConsts::FN_HOURS_FROM_DATETIME_1);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_minutes_from_dateTime,
+        (createQName("http://www.w3.org/2005/xpath-functions","","minutes-from-dateTime";), 
+        GENV_TYPESYSTEM.DATETIME_TYPE_QUESTION, 
+        GENV_TYPESYSTEM.INTEGER_TYPE_QUESTION),
+        FunctionConsts::FN_MINUTES_FROM_DATETIME_1);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_seconds_from_dateTime,
+        (createQName("http://www.w3.org/2005/xpath-functions","","seconds-from-dateTime";), 
+        GENV_TYPESYSTEM.DATETIME_TYPE_QUESTION, 
+        GENV_TYPESYSTEM.DECIMAL_TYPE_QUESTION),
+        FunctionConsts::FN_SECONDS_FROM_DATETIME_1);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_timezone_from_dateTime,
+        (createQName("http://www.w3.org/2005/xpath-functions","","timezone-from-dateTime";), 
+        GENV_TYPESYSTEM.DATETIME_TYPE_QUESTION, 
+        GENV_TYPESYSTEM.DT_DURATION_TYPE_QUESTION),
+        FunctionConsts::FN_TIMEZONE_FROM_DATETIME_1);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_year_from_date,
+        (createQName("http://www.w3.org/2005/xpath-functions","","year-from-date";), 
+        GENV_TYPESYSTEM.DATE_TYPE_QUESTION, 
+        GENV_TYPESYSTEM.INTEGER_TYPE_QUESTION),
+        FunctionConsts::FN_YEAR_FROM_DATE_1);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_month_from_date,
+        (createQName("http://www.w3.org/2005/xpath-functions","","month-from-date";), 
+        GENV_TYPESYSTEM.DATE_TYPE_QUESTION, 
+        GENV_TYPESYSTEM.INTEGER_TYPE_QUESTION),
+        FunctionConsts::FN_MONTH_FROM_DATE_1);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_day_from_date,
+        (createQName("http://www.w3.org/2005/xpath-functions","","day-from-date";), 
+        GENV_TYPESYSTEM.DATE_TYPE_QUESTION, 
+        GENV_TYPESYSTEM.INTEGER_TYPE_QUESTION),
+        FunctionConsts::FN_DAY_FROM_DATE_1);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_timezone_from_date,
+        (createQName("http://www.w3.org/2005/xpath-functions","","timezone-from-date";), 
+        GENV_TYPESYSTEM.DATE_TYPE_QUESTION, 
+        GENV_TYPESYSTEM.DT_DURATION_TYPE_QUESTION),
+        FunctionConsts::FN_TIMEZONE_FROM_DATE_1);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_hours_from_time,
+        (createQName("http://www.w3.org/2005/xpath-functions","","hours-from-time";), 
+        GENV_TYPESYSTEM.TIME_TYPE_QUESTION, 
+        GENV_TYPESYSTEM.INTEGER_TYPE_QUESTION),
+        FunctionConsts::FN_HOURS_FROM_TIME_1);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_minutes_from_time,
+        (createQName("http://www.w3.org/2005/xpath-functions","","minutes-from-time";), 
+        GENV_TYPESYSTEM.TIME_TYPE_QUESTION, 
+        GENV_TYPESYSTEM.INTEGER_TYPE_QUESTION),
+        FunctionConsts::FN_MINUTES_FROM_TIME_1);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_seconds_from_time,
+        (createQName("http://www.w3.org/2005/xpath-functions","","seconds-from-time";), 
+        GENV_TYPESYSTEM.TIME_TYPE_QUESTION, 
+        GENV_TYPESYSTEM.DECIMAL_TYPE_QUESTION),
+        FunctionConsts::FN_SECONDS_FROM_TIME_1);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_timezone_from_time,
+        (createQName("http://www.w3.org/2005/xpath-functions","","timezone-from-time";), 
+        GENV_TYPESYSTEM.TIME_TYPE_QUESTION, 
+        GENV_TYPESYSTEM.DT_DURATION_TYPE_QUESTION),
+        FunctionConsts::FN_TIMEZONE_FROM_TIME_1);
+
+  }
+
+}
+
+
+}
+
+
+

=== modified file 'src/functions/pregenerated/func_durations_dates_times.h'
--- src/functions/pregenerated/func_durations_dates_times.h	2012-03-28 23:58:23 +0000
+++ src/functions/pregenerated/func_durations_dates_times.h	2012-04-13 09:35:12 +0000
@@ -1,364 +1,364 @@
-/*
- * Copyright 2006-2008 The FLWOR Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- 
-// ******************************************
-// *                                        *
-// * THIS IS A GENERATED FILE. DO NOT EDIT! *
-// * SEE .xml FILE WITH SAME NAME           *
-// *                                        *
-// ******************************************
-
-
-#ifndef ZORBA_FUNCTIONS_DURATIONS_DATES_TIMES_H
-#define ZORBA_FUNCTIONS_DURATIONS_DATES_TIMES_H
-
-
-#include "common/shared_types.h"
-#include "functions/function_impl.h"
-
-
-namespace zorba {
-
-
-void populate_context_durations_dates_times(static_context* sctx);
-
-
-
-
-//fn:years-from-duration
-class fn_years_from_duration : public function
-{
-public:
-  fn_years_from_duration(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-
-  }
-
-  CODEGEN_DECL();
-};
-
-
-//fn:months-from-duration
-class fn_months_from_duration : public function
-{
-public:
-  fn_months_from_duration(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-
-  }
-
-  CODEGEN_DECL();
-};
-
-
-//fn:days-from-duration
-class fn_days_from_duration : public function
-{
-public:
-  fn_days_from_duration(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-
-  }
-
-  CODEGEN_DECL();
-};
-
-
-//fn:hours-from-duration
-class fn_hours_from_duration : public function
-{
-public:
-  fn_hours_from_duration(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-
-  }
-
-  CODEGEN_DECL();
-};
-
-
-//fn:minutes-from-duration
-class fn_minutes_from_duration : public function
-{
-public:
-  fn_minutes_from_duration(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-
-  }
-
-  CODEGEN_DECL();
-};
-
-
-//fn:seconds-from-duration
-class fn_seconds_from_duration : public function
-{
-public:
-  fn_seconds_from_duration(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-
-  }
-
-  CODEGEN_DECL();
-};
-
-
-//fn:year-from-dateTime
-class fn_year_from_dateTime : public function
-{
-public:
-  fn_year_from_dateTime(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-
-  }
-
-  CODEGEN_DECL();
-};
-
-
-//fn:month-from-dateTime
-class fn_month_from_dateTime : public function
-{
-public:
-  fn_month_from_dateTime(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-
-  }
-
-  CODEGEN_DECL();
-};
-
-
-//fn:day-from-dateTime
-class fn_day_from_dateTime : public function
-{
-public:
-  fn_day_from_dateTime(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-
-  }
-
-  CODEGEN_DECL();
-};
-
-
-//fn:hours-from-dateTime
-class fn_hours_from_dateTime : public function
-{
-public:
-  fn_hours_from_dateTime(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-
-  }
-
-  CODEGEN_DECL();
-};
-
-
-//fn:minutes-from-dateTime
-class fn_minutes_from_dateTime : public function
-{
-public:
-  fn_minutes_from_dateTime(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-
-  }
-
-  CODEGEN_DECL();
-};
-
-
-//fn:seconds-from-dateTime
-class fn_seconds_from_dateTime : public function
-{
-public:
-  fn_seconds_from_dateTime(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-
-  }
-
-  CODEGEN_DECL();
-};
-
-
-//fn:timezone-from-dateTime
-class fn_timezone_from_dateTime : public function
-{
-public:
-  fn_timezone_from_dateTime(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-
-  }
-
-  CODEGEN_DECL();
-};
-
-
-//fn:year-from-date
-class fn_year_from_date : public function
-{
-public:
-  fn_year_from_date(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-
-  }
-
-  CODEGEN_DECL();
-};
-
-
-//fn:month-from-date
-class fn_month_from_date : public function
-{
-public:
-  fn_month_from_date(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-
-  }
-
-  CODEGEN_DECL();
-};
-
-
-//fn:day-from-date
-class fn_day_from_date : public function
-{
-public:
-  fn_day_from_date(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-
-  }
-
-  CODEGEN_DECL();
-};
-
-
-//fn:timezone-from-date
-class fn_timezone_from_date : public function
-{
-public:
-  fn_timezone_from_date(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-
-  }
-
-  CODEGEN_DECL();
-};
-
-
-//fn:hours-from-time
-class fn_hours_from_time : public function
-{
-public:
-  fn_hours_from_time(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-
-  }
-
-  CODEGEN_DECL();
-};
-
-
-//fn:minutes-from-time
-class fn_minutes_from_time : public function
-{
-public:
-  fn_minutes_from_time(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-
-  }
-
-  CODEGEN_DECL();
-};
-
-
-//fn:seconds-from-time
-class fn_seconds_from_time : public function
-{
-public:
-  fn_seconds_from_time(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-
-  }
-
-  CODEGEN_DECL();
-};
-
-
-//fn:timezone-from-time
-class fn_timezone_from_time : public function
-{
-public:
-  fn_timezone_from_time(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-
-  }
-
-  CODEGEN_DECL();
-};
-
-
-} //namespace zorba
-
-
-#endif
-/*
- * Local variables:
- * mode: c++
- * End:
- */ 
+/*
+ * Copyright 2006-2008 The FLWOR Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+ 
+// ******************************************
+// *                                        *
+// * THIS IS A GENERATED FILE. DO NOT EDIT! *
+// * SEE .xml FILE WITH SAME NAME           *
+// *                                        *
+// ******************************************
+
+
+#ifndef ZORBA_FUNCTIONS_DURATIONS_DATES_TIMES_H
+#define ZORBA_FUNCTIONS_DURATIONS_DATES_TIMES_H
+
+
+#include "common/shared_types.h"
+#include "functions/function_impl.h"
+
+
+namespace zorba {
+
+
+void populate_context_durations_dates_times(static_context* sctx);
+
+
+
+
+//fn:years-from-duration
+class fn_years_from_duration : public function
+{
+public:
+  fn_years_from_duration(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  CODEGEN_DECL();
+};
+
+
+//fn:months-from-duration
+class fn_months_from_duration : public function
+{
+public:
+  fn_months_from_duration(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  CODEGEN_DECL();
+};
+
+
+//fn:days-from-duration
+class fn_days_from_duration : public function
+{
+public:
+  fn_days_from_duration(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  CODEGEN_DECL();
+};
+
+
+//fn:hours-from-duration
+class fn_hours_from_duration : public function
+{
+public:
+  fn_hours_from_duration(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  CODEGEN_DECL();
+};
+
+
+//fn:minutes-from-duration
+class fn_minutes_from_duration : public function
+{
+public:
+  fn_minutes_from_duration(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  CODEGEN_DECL();
+};
+
+
+//fn:seconds-from-duration
+class fn_seconds_from_duration : public function
+{
+public:
+  fn_seconds_from_duration(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  CODEGEN_DECL();
+};
+
+
+//fn:year-from-dateTime
+class fn_year_from_dateTime : public function
+{
+public:
+  fn_year_from_dateTime(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  CODEGEN_DECL();
+};
+
+
+//fn:month-from-dateTime
+class fn_month_from_dateTime : public function
+{
+public:
+  fn_month_from_dateTime(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  CODEGEN_DECL();
+};
+
+
+//fn:day-from-dateTime
+class fn_day_from_dateTime : public function
+{
+public:
+  fn_day_from_dateTime(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  CODEGEN_DECL();
+};
+
+
+//fn:hours-from-dateTime
+class fn_hours_from_dateTime : public function
+{
+public:
+  fn_hours_from_dateTime(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  CODEGEN_DECL();
+};
+
+
+//fn:minutes-from-dateTime
+class fn_minutes_from_dateTime : public function
+{
+public:
+  fn_minutes_from_dateTime(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  CODEGEN_DECL();
+};
+
+
+//fn:seconds-from-dateTime
+class fn_seconds_from_dateTime : public function
+{
+public:
+  fn_seconds_from_dateTime(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  CODEGEN_DECL();
+};
+
+
+//fn:timezone-from-dateTime
+class fn_timezone_from_dateTime : public function
+{
+public:
+  fn_timezone_from_dateTime(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  CODEGEN_DECL();
+};
+
+
+//fn:year-from-date
+class fn_year_from_date : public function
+{
+public:
+  fn_year_from_date(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  CODEGEN_DECL();
+};
+
+
+//fn:month-from-date
+class fn_month_from_date : public function
+{
+public:
+  fn_month_from_date(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  CODEGEN_DECL();
+};
+
+
+//fn:day-from-date
+class fn_day_from_date : public function
+{
+public:
+  fn_day_from_date(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  CODEGEN_DECL();
+};
+
+
+//fn:timezone-from-date
+class fn_timezone_from_date : public function
+{
+public:
+  fn_timezone_from_date(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  CODEGEN_DECL();
+};
+
+
+//fn:hours-from-time
+class fn_hours_from_time : public function
+{
+public:
+  fn_hours_from_time(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  CODEGEN_DECL();
+};
+
+
+//fn:minutes-from-time
+class fn_minutes_from_time : public function
+{
+public:
+  fn_minutes_from_time(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  CODEGEN_DECL();
+};
+
+
+//fn:seconds-from-time
+class fn_seconds_from_time : public function
+{
+public:
+  fn_seconds_from_time(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  CODEGEN_DECL();
+};
+
+
+//fn:timezone-from-time
+class fn_timezone_from_time : public function
+{
+public:
+  fn_timezone_from_time(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  CODEGEN_DECL();
+};
+
+
+} //namespace zorba
+
+
+#endif
+/*
+ * Local variables:
+ * mode: c++
+ * End:
+ */ 

=== modified file 'src/functions/pregenerated/func_errors_and_diagnostics.cpp'
--- src/functions/pregenerated/func_errors_and_diagnostics.cpp	2012-03-28 05:19:57 +0000
+++ src/functions/pregenerated/func_errors_and_diagnostics.cpp	2012-04-13 09:35:12 +0000
@@ -1,115 +1,115 @@
-/*
- * Copyright 2006-2008 The FLWOR Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- 
-// ******************************************
-// *                                        *
-// * THIS IS A GENERATED FILE. DO NOT EDIT! *
-// * SEE .xml FILE WITH SAME NAME           *
-// *                                        *
-// ******************************************
-
-
-#include "stdafx.h"
-#include "runtime/errors_and_diagnostics/errors_and_diagnostics.h"
-#include "functions/func_errors_and_diagnostics.h"
-
-
-namespace zorba{
-
-
-
-PlanIter_t fn_error::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new ErrorIterator(sctx, loc, argv);
-}
-
-
-void populate_context_errors_and_diagnostics(static_context* sctx)
-{
-  {
-    
-
-    DECL_WITH_KIND(sctx, fn_error,
-        (createQName("http://www.w3.org/2005/xpath-functions","","error";), 
-        GENV_TYPESYSTEM.NONE_TYPE),
-        FunctionConsts::FN_ERROR_0);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, fn_error,
-        (createQName("http://www.w3.org/2005/xpath-functions","","error";), 
-        GENV_TYPESYSTEM.QNAME_TYPE_ONE, 
-        GENV_TYPESYSTEM.NONE_TYPE),
-        FunctionConsts::FN_ERROR_1);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, fn_error,
-        (createQName("http://www.w3.org/2005/xpath-functions","","error";), 
-        GENV_TYPESYSTEM.QNAME_TYPE_QUESTION, 
-        GENV_TYPESYSTEM.STRING_TYPE_ONE, 
-        GENV_TYPESYSTEM.NONE_TYPE),
-        FunctionConsts::FN_ERROR_2);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, fn_error,
-        (createQName("http://www.w3.org/2005/xpath-functions","","error";), 
-        GENV_TYPESYSTEM.QNAME_TYPE_QUESTION, 
-        GENV_TYPESYSTEM.STRING_TYPE_ONE, 
-        GENV_TYPESYSTEM.ITEM_TYPE_STAR, 
-        GENV_TYPESYSTEM.NONE_TYPE),
-        FunctionConsts::FN_ERROR_3);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, fn_trace,
-        (createQName("http://www.w3.org/2005/xpath-functions","","trace";), 
-        GENV_TYPESYSTEM.ITEM_TYPE_STAR, 
-        GENV_TYPESYSTEM.STRING_TYPE_ONE, 
-        GENV_TYPESYSTEM.ITEM_TYPE_STAR),
-        FunctionConsts::FN_TRACE_2);
-
-  }
-
-}
-
-
-}
-
-
-
+/*
+ * Copyright 2006-2008 The FLWOR Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+ 
+// ******************************************
+// *                                        *
+// * THIS IS A GENERATED FILE. DO NOT EDIT! *
+// * SEE .xml FILE WITH SAME NAME           *
+// *                                        *
+// ******************************************
+
+
+#include "stdafx.h"
+#include "runtime/errors_and_diagnostics/errors_and_diagnostics.h"
+#include "functions/func_errors_and_diagnostics.h"
+
+
+namespace zorba{
+
+
+
+PlanIter_t fn_error::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new ErrorIterator(sctx, loc, argv);
+}
+
+
+void populate_context_errors_and_diagnostics(static_context* sctx)
+{
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_error,
+        (createQName("http://www.w3.org/2005/xpath-functions","","error";), 
+        GENV_TYPESYSTEM.NONE_TYPE),
+        FunctionConsts::FN_ERROR_0);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_error,
+        (createQName("http://www.w3.org/2005/xpath-functions","","error";), 
+        GENV_TYPESYSTEM.QNAME_TYPE_ONE, 
+        GENV_TYPESYSTEM.NONE_TYPE),
+        FunctionConsts::FN_ERROR_1);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_error,
+        (createQName("http://www.w3.org/2005/xpath-functions","","error";), 
+        GENV_TYPESYSTEM.QNAME_TYPE_QUESTION, 
+        GENV_TYPESYSTEM.STRING_TYPE_ONE, 
+        GENV_TYPESYSTEM.NONE_TYPE),
+        FunctionConsts::FN_ERROR_2);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_error,
+        (createQName("http://www.w3.org/2005/xpath-functions","","error";), 
+        GENV_TYPESYSTEM.QNAME_TYPE_QUESTION, 
+        GENV_TYPESYSTEM.STRING_TYPE_ONE, 
+        GENV_TYPESYSTEM.ITEM_TYPE_STAR, 
+        GENV_TYPESYSTEM.NONE_TYPE),
+        FunctionConsts::FN_ERROR_3);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_trace,
+        (createQName("http://www.w3.org/2005/xpath-functions","","trace";), 
+        GENV_TYPESYSTEM.ITEM_TYPE_STAR, 
+        GENV_TYPESYSTEM.STRING_TYPE_ONE, 
+        GENV_TYPESYSTEM.ITEM_TYPE_STAR),
+        FunctionConsts::FN_TRACE_2);
+
+  }
+
+}
+
+
+}
+
+
+

=== modified file 'src/functions/pregenerated/func_errors_and_diagnostics.h'
--- src/functions/pregenerated/func_errors_and_diagnostics.h	2012-03-28 05:19:57 +0000
+++ src/functions/pregenerated/func_errors_and_diagnostics.h	2012-04-13 09:35:12 +0000
@@ -1,97 +1,97 @@
-/*
- * Copyright 2006-2008 The FLWOR Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- 
-// ******************************************
-// *                                        *
-// * THIS IS A GENERATED FILE. DO NOT EDIT! *
-// * SEE .xml FILE WITH SAME NAME           *
-// *                                        *
-// ******************************************
-
-
-#ifndef ZORBA_FUNCTIONS_ERRORS_AND_DIAGNOSTICS_H
-#define ZORBA_FUNCTIONS_ERRORS_AND_DIAGNOSTICS_H
-
-
-#include "common/shared_types.h"
-#include "functions/function_impl.h"
-
-
-namespace zorba {
-
-
-void populate_context_errors_and_diagnostics(static_context* sctx);
-
-
-
-
-//fn:error
-class fn_error : public function
-{
-public:
-  fn_error(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-
-  }
-
-  short getScriptingKind() const { return VACUOUS_EXPR; }
-
-  bool mustCopyInputNodes(expr* fo, csize producer) const { return producer == 2; }
-
-  CODEGEN_DECL();
-};
-
-
-//fn:trace
-class fn_trace : public function
-{
-public:
-  fn_trace(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-
-  }
-
-  bool isMap(ulong producer) const { return producer == 0; }
-
-  bool propagatesDistinctNodes(csize producer) const { return producer == 0; }
-
-  bool propagatesSortedNodes(csize producer) const { return producer == 0; }
-
-  BoolAnnotationValue ignoresSortedNodes(expr* fo, csize producer) const;
-
-  BoolAnnotationValue ignoresDuplicateNodes(expr* fo, csize producer) const;
-
-  bool accessesDynCtx() const { return true; }
-
-  xqtref_t getReturnType(const fo_expr* caller) const;
-
-  CODEGEN_DECL();
-};
-
-
-} //namespace zorba
-
-
-#endif
-/*
- * Local variables:
- * mode: c++
- * End:
- */ 
+/*
+ * Copyright 2006-2008 The FLWOR Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+ 
+// ******************************************
+// *                                        *
+// * THIS IS A GENERATED FILE. DO NOT EDIT! *
+// * SEE .xml FILE WITH SAME NAME           *
+// *                                        *
+// ******************************************
+
+
+#ifndef ZORBA_FUNCTIONS_ERRORS_AND_DIAGNOSTICS_H
+#define ZORBA_FUNCTIONS_ERRORS_AND_DIAGNOSTICS_H
+
+
+#include "common/shared_types.h"
+#include "functions/function_impl.h"
+
+
+namespace zorba {
+
+
+void populate_context_errors_and_diagnostics(static_context* sctx);
+
+
+
+
+//fn:error
+class fn_error : public function
+{
+public:
+  fn_error(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  short getScriptingKind() const { return VACUOUS_EXPR; }
+
+  bool mustCopyInputNodes(expr* fo, csize producer) const { return producer == 2; }
+
+  CODEGEN_DECL();
+};
+
+
+//fn:trace
+class fn_trace : public function
+{
+public:
+  fn_trace(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  bool isMap(ulong producer) const { return producer == 0; }
+
+  bool propagatesDistinctNodes(csize producer) const { return producer == 0; }
+
+  bool propagatesSortedNodes(csize producer) const { return producer == 0; }
+
+  BoolAnnotationValue ignoresSortedNodes(expr* fo, csize producer) const;
+
+  BoolAnnotationValue ignoresDuplicateNodes(expr* fo, csize producer) const;
+
+  bool accessesDynCtx() const { return true; }
+
+  xqtref_t getReturnType(const fo_expr* caller) const;
+
+  CODEGEN_DECL();
+};
+
+
+} //namespace zorba
+
+
+#endif
+/*
+ * Local variables:
+ * mode: c++
+ * End:
+ */ 

=== modified file 'src/functions/pregenerated/func_fetch.cpp'
--- src/functions/pregenerated/func_fetch.cpp	2012-03-28 05:19:57 +0000
+++ src/functions/pregenerated/func_fetch.cpp	2012-04-13 09:35:12 +0000
@@ -1,86 +1,86 @@
-/*
- * Copyright 2006-2008 The FLWOR Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- 
-// ******************************************
-// *                                        *
-// * THIS IS A GENERATED FILE. DO NOT EDIT! *
-// * SEE .xml FILE WITH SAME NAME           *
-// *                                        *
-// ******************************************
-
-
-#include "stdafx.h"
-#include "runtime/fetch/fetch.h"
-#include "functions/func_fetch.h"
-
-
-namespace zorba{
-
-
-
-PlanIter_t fn_zorba_fetch_content::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new FetchContentIterator(sctx, loc, argv);
-}
-
-PlanIter_t fn_zorba_fetch_content_type::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new FetchContentTypeIterator(sctx, loc, argv);
-}
-
-void populate_context_fetch(static_context* sctx)
-{
-  {
-    
-
-    DECL_WITH_KIND(sctx, fn_zorba_fetch_content,
-        (createQName("http://www.zorba-xquery.com/modules/fetch","","content";), 
-        GENV_TYPESYSTEM.STRING_TYPE_ONE, 
-        GENV_TYPESYSTEM.STRING_TYPE_ONE, 
-        GENV_TYPESYSTEM.STRING_TYPE_ONE),
-        FunctionConsts::FN_ZORBA_FETCH_CONTENT_2);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, fn_zorba_fetch_content_type,
-        (createQName("http://www.zorba-xquery.com/modules/fetch","","content-type";), 
-        GENV_TYPESYSTEM.STRING_TYPE_ONE, 
-        GENV_TYPESYSTEM.STRING_TYPE_ONE),
-        FunctionConsts::FN_ZORBA_FETCH_CONTENT_TYPE_1);
-
-  }
-
-}
-
-
-}
-
-
-
+/*
+ * Copyright 2006-2008 The FLWOR Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+ 
+// ******************************************
+// *                                        *
+// * THIS IS A GENERATED FILE. DO NOT EDIT! *
+// * SEE .xml FILE WITH SAME NAME           *
+// *                                        *
+// ******************************************
+
+
+#include "stdafx.h"
+#include "runtime/fetch/fetch.h"
+#include "functions/func_fetch.h"
+
+
+namespace zorba{
+
+
+
+PlanIter_t fn_zorba_fetch_content::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new FetchContentIterator(sctx, loc, argv);
+}
+
+PlanIter_t fn_zorba_fetch_content_type::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new FetchContentTypeIterator(sctx, loc, argv);
+}
+
+void populate_context_fetch(static_context* sctx)
+{
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_zorba_fetch_content,
+        (createQName("http://www.zorba-xquery.com/modules/fetch","","content";), 
+        GENV_TYPESYSTEM.STRING_TYPE_ONE, 
+        GENV_TYPESYSTEM.STRING_TYPE_ONE, 
+        GENV_TYPESYSTEM.STRING_TYPE_ONE),
+        FunctionConsts::FN_ZORBA_FETCH_CONTENT_2);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_zorba_fetch_content_type,
+        (createQName("http://www.zorba-xquery.com/modules/fetch","","content-type";), 
+        GENV_TYPESYSTEM.STRING_TYPE_ONE, 
+        GENV_TYPESYSTEM.STRING_TYPE_ONE),
+        FunctionConsts::FN_ZORBA_FETCH_CONTENT_TYPE_1);
+
+  }
+
+}
+
+
+}
+
+
+

=== modified file 'src/functions/pregenerated/func_fetch.h'
--- src/functions/pregenerated/func_fetch.h	2012-03-28 05:19:57 +0000
+++ src/functions/pregenerated/func_fetch.h	2012-04-13 09:35:12 +0000
@@ -1,83 +1,83 @@
-/*
- * Copyright 2006-2008 The FLWOR Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- 
-// ******************************************
-// *                                        *
-// * THIS IS A GENERATED FILE. DO NOT EDIT! *
-// * SEE .xml FILE WITH SAME NAME           *
-// *                                        *
-// ******************************************
-
-
-#ifndef ZORBA_FUNCTIONS_FETCH_H
-#define ZORBA_FUNCTIONS_FETCH_H
-
-
-#include "common/shared_types.h"
-#include "functions/function_impl.h"
-
-
-namespace zorba {
-
-
-void populate_context_fetch(static_context* sctx);
-
-
-
-
-//fn-zorba-fetch:content
-class fn_zorba_fetch_content : public function
-{
-public:
-  fn_zorba_fetch_content(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-
-  }
-
-  bool accessesDynCtx() const { return true; }
-
-  CODEGEN_DECL();
-};
-
-
-//fn-zorba-fetch:content-type
-class fn_zorba_fetch_content_type : public function
-{
-public:
-  fn_zorba_fetch_content_type(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-
-  }
-
-  bool accessesDynCtx() const { return true; }
-
-  CODEGEN_DECL();
-};
-
-
-} //namespace zorba
-
-
-#endif
-/*
- * Local variables:
- * mode: c++
- * End:
- */ 
+/*
+ * Copyright 2006-2008 The FLWOR Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+ 
+// ******************************************
+// *                                        *
+// * THIS IS A GENERATED FILE. DO NOT EDIT! *
+// * SEE .xml FILE WITH SAME NAME           *
+// *                                        *
+// ******************************************
+
+
+#ifndef ZORBA_FUNCTIONS_FETCH_H
+#define ZORBA_FUNCTIONS_FETCH_H
+
+
+#include "common/shared_types.h"
+#include "functions/function_impl.h"
+
+
+namespace zorba {
+
+
+void populate_context_fetch(static_context* sctx);
+
+
+
+
+//fn-zorba-fetch:content
+class fn_zorba_fetch_content : public function
+{
+public:
+  fn_zorba_fetch_content(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  bool accessesDynCtx() const { return true; }
+
+  CODEGEN_DECL();
+};
+
+
+//fn-zorba-fetch:content-type
+class fn_zorba_fetch_content_type : public function
+{
+public:
+  fn_zorba_fetch_content_type(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  bool accessesDynCtx() const { return true; }
+
+  CODEGEN_DECL();
+};
+
+
+} //namespace zorba
+
+
+#endif
+/*
+ * Local variables:
+ * mode: c++
+ * End:
+ */ 

=== modified file 'src/functions/pregenerated/func_fnput.cpp'
--- src/functions/pregenerated/func_fnput.cpp	2012-03-28 05:19:57 +0000
+++ src/functions/pregenerated/func_fnput.cpp	2012-04-13 09:35:12 +0000
@@ -1,64 +1,64 @@
-/*
- * Copyright 2006-2008 The FLWOR Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- 
-// ******************************************
-// *                                        *
-// * THIS IS A GENERATED FILE. DO NOT EDIT! *
-// * SEE .xml FILE WITH SAME NAME           *
-// *                                        *
-// ******************************************
-
-
-#include "stdafx.h"
-#include "runtime/fnput/fnput.h"
-#include "functions/func_fnput.h"
-
-
-namespace zorba{
-
-
-
-PlanIter_t fn_put::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new FnPutIterator(sctx, loc, argv);
-}
-
-void populate_context_fnput(static_context* sctx)
-{
-  {
-    
-
-    DECL_WITH_KIND(sctx, fn_put,
-        (createQName("http://www.w3.org/2005/xpath-functions","","put";), 
-        GENV_TYPESYSTEM.ANY_NODE_TYPE_ONE, 
-        GENV_TYPESYSTEM.STRING_TYPE_ONE, 
-        GENV_TYPESYSTEM.EMPTY_TYPE),
-        FunctionConsts::FN_PUT_2);
-
-  }
-
-}
-
-
-}
-
-
-
+/*
+ * Copyright 2006-2008 The FLWOR Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+ 
+// ******************************************
+// *                                        *
+// * THIS IS A GENERATED FILE. DO NOT EDIT! *
+// * SEE .xml FILE WITH SAME NAME           *
+// *                                        *
+// ******************************************
+
+
+#include "stdafx.h"
+#include "runtime/fnput/fnput.h"
+#include "functions/func_fnput.h"
+
+
+namespace zorba{
+
+
+
+PlanIter_t fn_put::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new FnPutIterator(sctx, loc, argv);
+}
+
+void populate_context_fnput(static_context* sctx)
+{
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_put,
+        (createQName("http://www.w3.org/2005/xpath-functions","","put";), 
+        GENV_TYPESYSTEM.ANY_NODE_TYPE_ONE, 
+        GENV_TYPESYSTEM.STRING_TYPE_ONE, 
+        GENV_TYPESYSTEM.EMPTY_TYPE),
+        FunctionConsts::FN_PUT_2);
+
+  }
+
+}
+
+
+}
+
+
+

=== modified file 'src/functions/pregenerated/func_fnput.h'
--- src/functions/pregenerated/func_fnput.h	2012-03-28 05:19:57 +0000
+++ src/functions/pregenerated/func_fnput.h	2012-04-13 09:35:12 +0000
@@ -1,70 +1,70 @@
-/*
- * Copyright 2006-2008 The FLWOR Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- 
-// ******************************************
-// *                                        *
-// * THIS IS A GENERATED FILE. DO NOT EDIT! *
-// * SEE .xml FILE WITH SAME NAME           *
-// *                                        *
-// ******************************************
-
-
-#ifndef ZORBA_FUNCTIONS_FNPUT_H
-#define ZORBA_FUNCTIONS_FNPUT_H
-
-
-#include "common/shared_types.h"
-#include "functions/function_impl.h"
-
-
-namespace zorba {
-
-
-void populate_context_fnput(static_context* sctx);
-
-
-
-
-//fn:put
-class fn_put : public function
-{
-public:
-  fn_put(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-
-  }
-
-  short getScriptingKind() const { return UPDATING_EXPR; }
-
-  bool accessesDynCtx() const { return true; }
-
-  bool mustCopyInputNodes(expr* fo, csize producer) const { return producer == 0; }
-
-  CODEGEN_DECL();
-};
-
-
-} //namespace zorba
-
-
-#endif
-/*
- * Local variables:
- * mode: c++
- * End:
- */ 
+/*
+ * Copyright 2006-2008 The FLWOR Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+ 
+// ******************************************
+// *                                        *
+// * THIS IS A GENERATED FILE. DO NOT EDIT! *
+// * SEE .xml FILE WITH SAME NAME           *
+// *                                        *
+// ******************************************
+
+
+#ifndef ZORBA_FUNCTIONS_FNPUT_H
+#define ZORBA_FUNCTIONS_FNPUT_H
+
+
+#include "common/shared_types.h"
+#include "functions/function_impl.h"
+
+
+namespace zorba {
+
+
+void populate_context_fnput(static_context* sctx);
+
+
+
+
+//fn:put
+class fn_put : public function
+{
+public:
+  fn_put(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  short getScriptingKind() const { return UPDATING_EXPR; }
+
+  bool accessesDynCtx() const { return true; }
+
+  bool mustCopyInputNodes(expr* fo, csize producer) const { return producer == 0; }
+
+  CODEGEN_DECL();
+};
+
+
+} //namespace zorba
+
+
+#endif
+/*
+ * Local variables:
+ * mode: c++
+ * End:
+ */ 

=== modified file 'src/functions/pregenerated/func_function_item_iter.cpp'
--- src/functions/pregenerated/func_function_item_iter.cpp	2012-03-28 05:19:57 +0000
+++ src/functions/pregenerated/func_function_item_iter.cpp	2012-04-13 09:35:12 +0000
@@ -1,122 +1,122 @@
-/*
- * Copyright 2006-2008 The FLWOR Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- 
-// ******************************************
-// *                                        *
-// * THIS IS A GENERATED FILE. DO NOT EDIT! *
-// * SEE .xml FILE WITH SAME NAME           *
-// *                                        *
-// ******************************************
-
-
-#include "stdafx.h"
-#include "runtime/function_item/function_item_iter.h"
-#include "functions/func_function_item_iter.h"
-
-
-namespace zorba{
-
-
-
-PlanIter_t fn_function_name_3_0::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new FunctionNameIterator(sctx, loc, argv);
-}
-
-PlanIter_t fn_function_arity_3_0::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new FunctionArityIterator(sctx, loc, argv);
-}
-
-PlanIter_t fn_partial_apply_3_0::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new PartialApplyIterator(sctx, loc, argv);
-}
-
-void populate_context_function_item_iter(static_context* sctx)
-{
-  {
-    
-
-    DECL_WITH_KIND(sctx, fn_function_name_3_0,
-        (createQName("http://www.w3.org/2005/xpath-functions","","function-name";), 
-        GENV_TYPESYSTEM.ANY_FUNCTION_TYPE_ONE, 
-        GENV_TYPESYSTEM.QNAME_TYPE_QUESTION),
-        FunctionConsts::FN_FUNCTION_NAME_1);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, fn_function_arity_3_0,
-        (createQName("http://www.w3.org/2005/xpath-functions","","function-arity";), 
-        GENV_TYPESYSTEM.ANY_FUNCTION_TYPE_ONE, 
-        GENV_TYPESYSTEM.INTEGER_TYPE_ONE),
-        FunctionConsts::FN_FUNCTION_ARITY_1);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, fn_partial_apply_3_0,
-        (createQName("http://www.w3.org/2005/xpath-functions","","partial-apply";), 
-        GENV_TYPESYSTEM.ANY_FUNCTION_TYPE_ONE, 
-        GENV_TYPESYSTEM.ITEM_TYPE_STAR, 
-        GENV_TYPESYSTEM.ANY_FUNCTION_TYPE_ONE),
-        FunctionConsts::FN_PARTIAL_APPLY_2);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, fn_partial_apply_3_0,
-        (createQName("http://www.w3.org/2005/xpath-functions","","partial-apply";), 
-        GENV_TYPESYSTEM.ANY_FUNCTION_TYPE_ONE, 
-        GENV_TYPESYSTEM.ITEM_TYPE_STAR, 
-        GENV_TYPESYSTEM.INTEGER_TYPE_ONE, 
-        GENV_TYPESYSTEM.ANY_FUNCTION_TYPE_ONE),
-        FunctionConsts::FN_PARTIAL_APPLY_3);
-
-  }
-
-}
-
-
-}
-
-
-
+/*
+ * Copyright 2006-2008 The FLWOR Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+ 
+// ******************************************
+// *                                        *
+// * THIS IS A GENERATED FILE. DO NOT EDIT! *
+// * SEE .xml FILE WITH SAME NAME           *
+// *                                        *
+// ******************************************
+
+
+#include "stdafx.h"
+#include "runtime/function_item/function_item_iter.h"
+#include "functions/func_function_item_iter.h"
+
+
+namespace zorba{
+
+
+
+PlanIter_t fn_function_name_3_0::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new FunctionNameIterator(sctx, loc, argv);
+}
+
+PlanIter_t fn_function_arity_3_0::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new FunctionArityIterator(sctx, loc, argv);
+}
+
+PlanIter_t fn_partial_apply_3_0::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new PartialApplyIterator(sctx, loc, argv);
+}
+
+void populate_context_function_item_iter(static_context* sctx)
+{
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_function_name_3_0,
+        (createQName("http://www.w3.org/2005/xpath-functions","","function-name";), 
+        GENV_TYPESYSTEM.ANY_FUNCTION_TYPE_ONE, 
+        GENV_TYPESYSTEM.QNAME_TYPE_QUESTION),
+        FunctionConsts::FN_FUNCTION_NAME_1);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_function_arity_3_0,
+        (createQName("http://www.w3.org/2005/xpath-functions","","function-arity";), 
+        GENV_TYPESYSTEM.ANY_FUNCTION_TYPE_ONE, 
+        GENV_TYPESYSTEM.INTEGER_TYPE_ONE),
+        FunctionConsts::FN_FUNCTION_ARITY_1);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_partial_apply_3_0,
+        (createQName("http://www.w3.org/2005/xpath-functions","","partial-apply";), 
+        GENV_TYPESYSTEM.ANY_FUNCTION_TYPE_ONE, 
+        GENV_TYPESYSTEM.ITEM_TYPE_STAR, 
+        GENV_TYPESYSTEM.ANY_FUNCTION_TYPE_ONE),
+        FunctionConsts::FN_PARTIAL_APPLY_2);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_partial_apply_3_0,
+        (createQName("http://www.w3.org/2005/xpath-functions","","partial-apply";), 
+        GENV_TYPESYSTEM.ANY_FUNCTION_TYPE_ONE, 
+        GENV_TYPESYSTEM.ITEM_TYPE_STAR, 
+        GENV_TYPESYSTEM.INTEGER_TYPE_ONE, 
+        GENV_TYPESYSTEM.ANY_FUNCTION_TYPE_ONE),
+        FunctionConsts::FN_PARTIAL_APPLY_3);
+
+  }
+
+}
+
+
+}
+
+
+

=== modified file 'src/functions/pregenerated/func_function_item_iter.h'
--- src/functions/pregenerated/func_function_item_iter.h	2012-03-28 05:19:57 +0000
+++ src/functions/pregenerated/func_function_item_iter.h	2012-04-13 09:35:12 +0000
@@ -1,94 +1,94 @@
-/*
- * Copyright 2006-2008 The FLWOR Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- 
-// ******************************************
-// *                                        *
-// * THIS IS A GENERATED FILE. DO NOT EDIT! *
-// * SEE .xml FILE WITH SAME NAME           *
-// *                                        *
-// ******************************************
-
-
-#ifndef ZORBA_FUNCTIONS_FUNCTION_ITEM_ITER_H
-#define ZORBA_FUNCTIONS_FUNCTION_ITEM_ITER_H
-
-
-#include "common/shared_types.h"
-#include "functions/function_impl.h"
-
-
-namespace zorba {
-
-
-void populate_context_function_item_iter(static_context* sctx);
-
-
-
-
-//fn:function-name
-class fn_function_name_3_0 : public function
-{
-public:
-  fn_function_name_3_0(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-theXQueryVersion = StaticContextConsts::xquery_version_3_0;
-  }
-
-  CODEGEN_DECL();
-};
-
-
-//fn:function-arity
-class fn_function_arity_3_0 : public function
-{
-public:
-  fn_function_arity_3_0(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-theXQueryVersion = StaticContextConsts::xquery_version_3_0;
-  }
-
-  CODEGEN_DECL();
-};
-
-
-//fn:partial-apply
-class fn_partial_apply_3_0 : public function
-{
-public:
-  fn_partial_apply_3_0(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-theXQueryVersion = StaticContextConsts::xquery_version_3_0;
-  }
-
-  CODEGEN_DECL();
-};
-
-
-} //namespace zorba
-
-
-#endif
-/*
- * Local variables:
- * mode: c++
- * End:
- */ 
+/*
+ * Copyright 2006-2008 The FLWOR Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+ 
+// ******************************************
+// *                                        *
+// * THIS IS A GENERATED FILE. DO NOT EDIT! *
+// * SEE .xml FILE WITH SAME NAME           *
+// *                                        *
+// ******************************************
+
+
+#ifndef ZORBA_FUNCTIONS_FUNCTION_ITEM_ITER_H
+#define ZORBA_FUNCTIONS_FUNCTION_ITEM_ITER_H
+
+
+#include "common/shared_types.h"
+#include "functions/function_impl.h"
+
+
+namespace zorba {
+
+
+void populate_context_function_item_iter(static_context* sctx);
+
+
+
+
+//fn:function-name
+class fn_function_name_3_0 : public function
+{
+public:
+  fn_function_name_3_0(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+theXQueryVersion = StaticContextConsts::xquery_version_3_0;
+  }
+
+  CODEGEN_DECL();
+};
+
+
+//fn:function-arity
+class fn_function_arity_3_0 : public function
+{
+public:
+  fn_function_arity_3_0(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+theXQueryVersion = StaticContextConsts::xquery_version_3_0;
+  }
+
+  CODEGEN_DECL();
+};
+
+
+//fn:partial-apply
+class fn_partial_apply_3_0 : public function
+{
+public:
+  fn_partial_apply_3_0(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+theXQueryVersion = StaticContextConsts::xquery_version_3_0;
+  }
+
+  CODEGEN_DECL();
+};
+
+
+} //namespace zorba
+
+
+#endif
+/*
+ * Local variables:
+ * mode: c++
+ * End:
+ */ 

=== modified file 'src/functions/pregenerated/func_ic_ddl.cpp'
--- src/functions/pregenerated/func_ic_ddl.cpp	2012-03-28 05:19:57 +0000
+++ src/functions/pregenerated/func_ic_ddl.cpp	2012-04-13 09:35:12 +0000
@@ -1,107 +1,107 @@
-/*
- * Copyright 2006-2008 The FLWOR Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- 
-// ******************************************
-// *                                        *
-// * THIS IS A GENERATED FILE. DO NOT EDIT! *
-// * SEE .xml FILE WITH SAME NAME           *
-// *                                        *
-// ******************************************
-
-
-#include "stdafx.h"
-#include "runtime/indexing/ic_ddl.h"
-#include "functions/func_ic_ddl.h"
-
-
-namespace zorba{
-
-
-
-PlanIter_t zorba_store_integrity_constraints_static_ddl_activate::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new ActivateICIterator(sctx, loc, argv[0]);
-}
-
-PlanIter_t zorba_store_integrity_constraints_static_ddl_deactivate::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new DeactivateICIterator(sctx, loc, argv[0]);
-}
-
-PlanIter_t zorba_store_integrity_constraints_static_dml_check_integrity_constraint::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new CheckICIterator(sctx, loc, argv[0]);
-}
-
-void populate_context_ic_ddl(static_context* sctx)
-{
-  {
-    
-
-    DECL_WITH_KIND(sctx, zorba_store_integrity_constraints_static_ddl_activate,
-        (createQName("http://www.zorba-xquery.com/modules/store/static/integrity_constraints/ddl","","activate";), 
-        GENV_TYPESYSTEM.QNAME_TYPE_ONE, 
-        GENV_TYPESYSTEM.EMPTY_TYPE),
-        FunctionConsts::ZORBA_STORE_INTEGRITY_CONSTRAINTS_STATIC_DDL_ACTIVATE_1);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, zorba_store_integrity_constraints_static_ddl_deactivate,
-        (createQName("http://www.zorba-xquery.com/modules/store/static/integrity_constraints/ddl","","deactivate";), 
-        GENV_TYPESYSTEM.QNAME_TYPE_ONE, 
-        GENV_TYPESYSTEM.EMPTY_TYPE),
-        FunctionConsts::ZORBA_STORE_INTEGRITY_CONSTRAINTS_STATIC_DDL_DEACTIVATE_1);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, zorba_store_integrity_constraints_static_dml_check_integrity_constraint,
-        (createQName("http://www.zorba-xquery.com/modules/store/static/integrity_constraints/dml","","check-integrity-constraint";), 
-        GENV_TYPESYSTEM.QNAME_TYPE_ONE, 
-        GENV_TYPESYSTEM.BOOLEAN_TYPE_ONE),
-        FunctionConsts::ZORBA_STORE_INTEGRITY_CONSTRAINTS_STATIC_DML_CHECK_INTEGRITY_CONSTRAINT_1);
-
-  }
-
-}
-
-
-}
-
-
-
+/*
+ * Copyright 2006-2008 The FLWOR Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+ 
+// ******************************************
+// *                                        *
+// * THIS IS A GENERATED FILE. DO NOT EDIT! *
+// * SEE .xml FILE WITH SAME NAME           *
+// *                                        *
+// ******************************************
+
+
+#include "stdafx.h"
+#include "runtime/indexing/ic_ddl.h"
+#include "functions/func_ic_ddl.h"
+
+
+namespace zorba{
+
+
+
+PlanIter_t zorba_store_integrity_constraints_static_ddl_activate::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new ActivateICIterator(sctx, loc, argv[0]);
+}
+
+PlanIter_t zorba_store_integrity_constraints_static_ddl_deactivate::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new DeactivateICIterator(sctx, loc, argv[0]);
+}
+
+PlanIter_t zorba_store_integrity_constraints_static_dml_check_integrity_constraint::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new CheckICIterator(sctx, loc, argv[0]);
+}
+
+void populate_context_ic_ddl(static_context* sctx)
+{
+  {
+    
+
+    DECL_WITH_KIND(sctx, zorba_store_integrity_constraints_static_ddl_activate,
+        (createQName("http://www.zorba-xquery.com/modules/store/static/integrity_constraints/ddl","","activate";), 
+        GENV_TYPESYSTEM.QNAME_TYPE_ONE, 
+        GENV_TYPESYSTEM.EMPTY_TYPE),
+        FunctionConsts::ZORBA_STORE_INTEGRITY_CONSTRAINTS_STATIC_DDL_ACTIVATE_1);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, zorba_store_integrity_constraints_static_ddl_deactivate,
+        (createQName("http://www.zorba-xquery.com/modules/store/static/integrity_constraints/ddl","","deactivate";), 
+        GENV_TYPESYSTEM.QNAME_TYPE_ONE, 
+        GENV_TYPESYSTEM.EMPTY_TYPE),
+        FunctionConsts::ZORBA_STORE_INTEGRITY_CONSTRAINTS_STATIC_DDL_DEACTIVATE_1);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, zorba_store_integrity_constraints_static_dml_check_integrity_constraint,
+        (createQName("http://www.zorba-xquery.com/modules/store/static/integrity_constraints/dml","","check-integrity-constraint";), 
+        GENV_TYPESYSTEM.QNAME_TYPE_ONE, 
+        GENV_TYPESYSTEM.BOOLEAN_TYPE_ONE),
+        FunctionConsts::ZORBA_STORE_INTEGRITY_CONSTRAINTS_STATIC_DML_CHECK_INTEGRITY_CONSTRAINT_1);
+
+  }
+
+}
+
+
+}
+
+
+

=== modified file 'src/functions/pregenerated/func_ic_ddl.h'
--- src/functions/pregenerated/func_ic_ddl.h	2012-03-28 05:19:57 +0000
+++ src/functions/pregenerated/func_ic_ddl.h	2012-04-13 09:35:12 +0000
@@ -1,104 +1,104 @@
-/*
- * Copyright 2006-2008 The FLWOR Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- 
-// ******************************************
-// *                                        *
-// * THIS IS A GENERATED FILE. DO NOT EDIT! *
-// * SEE .xml FILE WITH SAME NAME           *
-// *                                        *
-// ******************************************
-
-
-#ifndef ZORBA_FUNCTIONS_IC_DDL_H
-#define ZORBA_FUNCTIONS_IC_DDL_H
-
-
-#include "common/shared_types.h"
-#include "functions/function_impl.h"
-
-
-namespace zorba {
-
-
-void populate_context_ic_ddl(static_context* sctx);
-
-
-
-
-//zorba-store-integrity_constraints-static-ddl:activate
-class zorba_store_integrity_constraints_static_ddl_activate : public function
-{
-public:
-  zorba_store_integrity_constraints_static_ddl_activate(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-
-  }
-
-  short getScriptingKind() const { return UPDATING_EXPR; }
-
-  bool accessesDynCtx() const { return true; }
-
-  CODEGEN_DECL();
-};
-
-
-//zorba-store-integrity_constraints-static-ddl:deactivate
-class zorba_store_integrity_constraints_static_ddl_deactivate : public function
-{
-public:
-  zorba_store_integrity_constraints_static_ddl_deactivate(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-
-  }
-
-  short getScriptingKind() const { return UPDATING_EXPR; }
-
-  bool accessesDynCtx() const { return true; }
-
-  CODEGEN_DECL();
-};
-
-
-//zorba-store-integrity_constraints-static-dml:check-integrity-constraint
-class zorba_store_integrity_constraints_static_dml_check_integrity_constraint : public function
-{
-public:
-  zorba_store_integrity_constraints_static_dml_check_integrity_constraint(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-
-  }
-
-  bool accessesDynCtx() const { return true; }
-
-  CODEGEN_DECL();
-};
-
-
-} //namespace zorba
-
-
-#endif
-/*
- * Local variables:
- * mode: c++
- * End:
- */ 
+/*
+ * Copyright 2006-2008 The FLWOR Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+ 
+// ******************************************
+// *                                        *
+// * THIS IS A GENERATED FILE. DO NOT EDIT! *
+// * SEE .xml FILE WITH SAME NAME           *
+// *                                        *
+// ******************************************
+
+
+#ifndef ZORBA_FUNCTIONS_IC_DDL_H
+#define ZORBA_FUNCTIONS_IC_DDL_H
+
+
+#include "common/shared_types.h"
+#include "functions/function_impl.h"
+
+
+namespace zorba {
+
+
+void populate_context_ic_ddl(static_context* sctx);
+
+
+
+
+//zorba-store-integrity_constraints-static-ddl:activate
+class zorba_store_integrity_constraints_static_ddl_activate : public function
+{
+public:
+  zorba_store_integrity_constraints_static_ddl_activate(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  short getScriptingKind() const { return UPDATING_EXPR; }
+
+  bool accessesDynCtx() const { return true; }
+
+  CODEGEN_DECL();
+};
+
+
+//zorba-store-integrity_constraints-static-ddl:deactivate
+class zorba_store_integrity_constraints_static_ddl_deactivate : public function
+{
+public:
+  zorba_store_integrity_constraints_static_ddl_deactivate(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  short getScriptingKind() const { return UPDATING_EXPR; }
+
+  bool accessesDynCtx() const { return true; }
+
+  CODEGEN_DECL();
+};
+
+
+//zorba-store-integrity_constraints-static-dml:check-integrity-constraint
+class zorba_store_integrity_constraints_static_dml_check_integrity_constraint : public function
+{
+public:
+  zorba_store_integrity_constraints_static_dml_check_integrity_constraint(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  bool accessesDynCtx() const { return true; }
+
+  CODEGEN_DECL();
+};
+
+
+} //namespace zorba
+
+
+#endif
+/*
+ * Local variables:
+ * mode: c++
+ * End:
+ */ 

=== modified file 'src/functions/pregenerated/func_json.cpp'
--- src/functions/pregenerated/func_json.cpp	2012-02-16 14:11:02 +0000
+++ src/functions/pregenerated/func_json.cpp	2012-04-13 09:35:12 +0000
@@ -1,87 +1,87 @@
-/*
- * Copyright 2006-2008 The FLWOR Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- 
-// ******************************************
-// *                                        *
-// * THIS IS A GENERATED FILE. DO NOT EDIT! *
-// * SEE .xml FILE WITH SAME NAME           *
-// *                                        *
-// ******************************************
-
-
-#include "stdafx.h"
-#include "runtime/json/json.h"
-#include "functions/func_json.h"
-
-
-namespace zorba{
-
-
-
-PlanIter_t fn_zorba_json_parse_internal::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new JSONParseInternal(sctx, loc, argv);
-}
-
-PlanIter_t fn_zorba_json_serialize_internal::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new JSONSerializeInternal(sctx, loc, argv);
-}
-
-void populate_context_json(static_context* sctx)
-{
-  {
-    
-
-    DECL_WITH_KIND(sctx, fn_zorba_json_parse_internal,
-        (createQName("http://www.zorba-xquery.com/modules/converters/json","","parse-internal";), 
-        GENV_TYPESYSTEM.STRING_TYPE_ONE, 
-        GENV_TYPESYSTEM.ITEM_TYPE_QUESTION, 
-        GENV_TYPESYSTEM.ELEMENT_TYPE_STAR),
-        FunctionConsts::FN_ZORBA_JSON_PARSE_INTERNAL_2);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, fn_zorba_json_serialize_internal,
-        (createQName("http://www.zorba-xquery.com/modules/converters/json","","serialize-internal";), 
-        GENV_TYPESYSTEM.ITEM_TYPE_STAR, 
-        GENV_TYPESYSTEM.ITEM_TYPE_QUESTION, 
-        GENV_TYPESYSTEM.STRING_TYPE_ONE),
-        FunctionConsts::FN_ZORBA_JSON_SERIALIZE_INTERNAL_2);
-
-  }
-
-}
-
-
-}
-
-
-
+/*
+ * Copyright 2006-2008 The FLWOR Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+ 
+// ******************************************
+// *                                        *
+// * THIS IS A GENERATED FILE. DO NOT EDIT! *
+// * SEE .xml FILE WITH SAME NAME           *
+// *                                        *
+// ******************************************
+
+
+#include "stdafx.h"
+#include "runtime/json/json.h"
+#include "functions/func_json.h"
+
+
+namespace zorba{
+
+
+
+PlanIter_t fn_zorba_json_parse_internal::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new JSONParseInternal(sctx, loc, argv);
+}
+
+PlanIter_t fn_zorba_json_serialize_internal::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new JSONSerializeInternal(sctx, loc, argv);
+}
+
+void populate_context_json(static_context* sctx)
+{
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_zorba_json_parse_internal,
+        (createQName("http://www.zorba-xquery.com/modules/converters/json","","parse-internal";), 
+        GENV_TYPESYSTEM.STRING_TYPE_ONE, 
+        GENV_TYPESYSTEM.ITEM_TYPE_QUESTION, 
+        GENV_TYPESYSTEM.ELEMENT_TYPE_STAR),
+        FunctionConsts::FN_ZORBA_JSON_PARSE_INTERNAL_2);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_zorba_json_serialize_internal,
+        (createQName("http://www.zorba-xquery.com/modules/converters/json","","serialize-internal";), 
+        GENV_TYPESYSTEM.ITEM_TYPE_STAR, 
+        GENV_TYPESYSTEM.ITEM_TYPE_QUESTION, 
+        GENV_TYPESYSTEM.STRING_TYPE_ONE),
+        FunctionConsts::FN_ZORBA_JSON_SERIALIZE_INTERNAL_2);
+
+  }
+
+}
+
+
+}
+
+
+

=== modified file 'src/functions/pregenerated/func_json.h'
--- src/functions/pregenerated/func_json.h	2012-01-12 00:13:28 +0000
+++ src/functions/pregenerated/func_json.h	2012-04-13 09:35:12 +0000
@@ -1,79 +1,79 @@
-/*
- * Copyright 2006-2008 The FLWOR Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- 
-// ******************************************
-// *                                        *
-// * THIS IS A GENERATED FILE. DO NOT EDIT! *
-// * SEE .xml FILE WITH SAME NAME           *
-// *                                        *
-// ******************************************
-
-
-#ifndef ZORBA_FUNCTIONS_JSON_H
-#define ZORBA_FUNCTIONS_JSON_H
-
-
-#include "common/shared_types.h"
-#include "functions/function_impl.h"
-
-
-namespace zorba {
-
-
-void populate_context_json(static_context* sctx);
-
-
-
-
-//fn-zorba-json:parse-internal
-class fn_zorba_json_parse_internal : public function
-{
-public:
-  fn_zorba_json_parse_internal(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-
-  }
-
-  CODEGEN_DECL();
-};
-
-
-//fn-zorba-json:serialize-internal
-class fn_zorba_json_serialize_internal : public function
-{
-public:
-  fn_zorba_json_serialize_internal(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-
-  }
-
-  CODEGEN_DECL();
-};
-
-
-} //namespace zorba
-
-
-#endif
-/*
- * Local variables:
- * mode: c++
- * End:
- */ 
+/*
+ * Copyright 2006-2008 The FLWOR Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+ 
+// ******************************************
+// *                                        *
+// * THIS IS A GENERATED FILE. DO NOT EDIT! *
+// * SEE .xml FILE WITH SAME NAME           *
+// *                                        *
+// ******************************************
+
+
+#ifndef ZORBA_FUNCTIONS_JSON_H
+#define ZORBA_FUNCTIONS_JSON_H
+
+
+#include "common/shared_types.h"
+#include "functions/function_impl.h"
+
+
+namespace zorba {
+
+
+void populate_context_json(static_context* sctx);
+
+
+
+
+//fn-zorba-json:parse-internal
+class fn_zorba_json_parse_internal : public function
+{
+public:
+  fn_zorba_json_parse_internal(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  CODEGEN_DECL();
+};
+
+
+//fn-zorba-json:serialize-internal
+class fn_zorba_json_serialize_internal : public function
+{
+public:
+  fn_zorba_json_serialize_internal(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  CODEGEN_DECL();
+};
+
+
+} //namespace zorba
+
+
+#endif
+/*
+ * Local variables:
+ * mode: c++
+ * End:
+ */ 

=== modified file 'src/functions/pregenerated/func_maps.cpp'
--- src/functions/pregenerated/func_maps.cpp	2012-03-28 05:19:57 +0000
+++ src/functions/pregenerated/func_maps.cpp	2012-04-13 09:35:12 +0000
@@ -1,221 +1,221 @@
-/*
- * Copyright 2006-2008 The FLWOR Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- 
-// ******************************************
-// *                                        *
-// * THIS IS A GENERATED FILE. DO NOT EDIT! *
-// * SEE .xml FILE WITH SAME NAME           *
-// *                                        *
-// ******************************************
-
-
-#include "stdafx.h"
-#include "runtime/store/maps.h"
-#include "functions/func_maps.h"
-
-
-namespace zorba{
-
-
-
-PlanIter_t zorba_store_data_structure_unordered_map_create::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new MapCreateIterator(sctx, loc, argv);
-}
-
-PlanIter_t zorba_store_data_structure_unordered_map_delete::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new MapDestroyIterator(sctx, loc, argv);
-}
-
-PlanIter_t zorba_store_data_structure_unordered_map_get::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new MapGetIterator(sctx, loc, argv);
-}
-
-PlanIter_t zorba_store_data_structure_unordered_map_insert::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new MapInsertIterator(sctx, loc, argv);
-}
-
-PlanIter_t zorba_store_data_structure_unordered_map_remove::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new MapRemoveIterator(sctx, loc, argv);
-}
-
-PlanIter_t zorba_store_data_structure_unordered_map_keys::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new MapKeysIterator(sctx, loc, argv);
-}
-
-PlanIter_t zorba_store_data_structure_unordered_map_size::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new MapSizeIterator(sctx, loc, argv);
-}
-
-PlanIter_t zorba_store_data_structure_unordered_map_available_maps::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new AvailableMapsIterator(sctx, loc, argv);
-}
-
-void populate_context_maps(static_context* sctx)
-{
-  {
-    std::vector<xqtref_t> lParamTypes;
-    lParamTypes.push_back(GENV_TYPESYSTEM.QNAME_TYPE_ONE);
-    lParamTypes.push_back(GENV_TYPESYSTEM.QNAME_TYPE_ONE);
-
-    DECL_WITH_KIND(sctx, zorba_store_data_structure_unordered_map_create,
-        (createQName("http://www.zorba-xquery.com/modules/store/data-structures/unordered-map","","create";), 
-        lParamTypes, GENV_TYPESYSTEM.EMPTY_TYPE, true),
-        FunctionConsts::ZORBA_STORE_DATA_STRUCTURE_UNORDERED_MAP_CREATE_N);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, zorba_store_data_structure_unordered_map_delete,
-        (createQName("http://www.zorba-xquery.com/modules/store/data-structures/unordered-map","","delete";), 
-        GENV_TYPESYSTEM.QNAME_TYPE_ONE, 
-        GENV_TYPESYSTEM.EMPTY_TYPE),
-        FunctionConsts::ZORBA_STORE_DATA_STRUCTURE_UNORDERED_MAP_DELETE_1);
-
-  }
-
-
-  {
-    std::vector<xqtref_t> lParamTypes;
-    lParamTypes.push_back(GENV_TYPESYSTEM.QNAME_TYPE_ONE);
-    lParamTypes.push_back(GENV_TYPESYSTEM.ANY_ATOMIC_TYPE_QUESTION);
-
-    DECL_WITH_KIND(sctx, zorba_store_data_structure_unordered_map_get,
-        (createQName("http://www.zorba-xquery.com/modules/store/data-structures/unordered-map","","get";), 
-        lParamTypes, GENV_TYPESYSTEM.ITEM_TYPE_STAR, true),
-        FunctionConsts::ZORBA_STORE_DATA_STRUCTURE_UNORDERED_MAP_GET_N);
-
-  }
-
-
-  {
-    std::vector<xqtref_t> lParamTypes;
-    lParamTypes.push_back(GENV_TYPESYSTEM.QNAME_TYPE_ONE);
-    lParamTypes.push_back(GENV_TYPESYSTEM.ITEM_TYPE_STAR);
-    lParamTypes.push_back(GENV_TYPESYSTEM.ANY_ATOMIC_TYPE_QUESTION);
-
-    DECL_WITH_KIND(sctx, zorba_store_data_structure_unordered_map_insert,
-        (createQName("http://www.zorba-xquery.com/modules/store/data-structures/unordered-map","","insert";), 
-        lParamTypes, GENV_TYPESYSTEM.EMPTY_TYPE, true),
-        FunctionConsts::ZORBA_STORE_DATA_STRUCTURE_UNORDERED_MAP_INSERT_N);
-
-  }
-
-
-  {
-    std::vector<xqtref_t> lParamTypes;
-    lParamTypes.push_back(GENV_TYPESYSTEM.QNAME_TYPE_ONE);
-    lParamTypes.push_back(GENV_TYPESYSTEM.ANY_ATOMIC_TYPE_QUESTION);
-
-    DECL_WITH_KIND(sctx, zorba_store_data_structure_unordered_map_remove,
-        (createQName("http://www.zorba-xquery.com/modules/store/data-structures/unordered-map","","remove";), 
-        lParamTypes, GENV_TYPESYSTEM.EMPTY_TYPE, true),
-        FunctionConsts::ZORBA_STORE_DATA_STRUCTURE_UNORDERED_MAP_REMOVE_N);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, zorba_store_data_structure_unordered_map_keys,
-        (createQName("http://www.zorba-xquery.com/modules/store/data-structures/unordered-map","","keys";), 
-        GENV_TYPESYSTEM.QNAME_TYPE_ONE, 
-        GENV_TYPESYSTEM.ANY_NODE_TYPE_STAR),
-        FunctionConsts::ZORBA_STORE_DATA_STRUCTURE_UNORDERED_MAP_KEYS_1);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, zorba_store_data_structure_unordered_map_size,
-        (createQName("http://www.zorba-xquery.com/modules/store/data-structures/unordered-map","","size";), 
-        GENV_TYPESYSTEM.QNAME_TYPE_ONE, 
-        GENV_TYPESYSTEM.INTEGER_TYPE_ONE),
-        FunctionConsts::ZORBA_STORE_DATA_STRUCTURE_UNORDERED_MAP_SIZE_1);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, zorba_store_data_structure_unordered_map_available_maps,
-        (createQName("http://www.zorba-xquery.com/modules/store/data-structures/unordered-map","","available-maps";), 
-        GENV_TYPESYSTEM.QNAME_TYPE_STAR),
-        FunctionConsts::ZORBA_STORE_DATA_STRUCTURE_UNORDERED_MAP_AVAILABLE_MAPS_0);
-
-  }
-
-}
-
-
-}
-
-
-
+/*
+ * Copyright 2006-2008 The FLWOR Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+ 
+// ******************************************
+// *                                        *
+// * THIS IS A GENERATED FILE. DO NOT EDIT! *
+// * SEE .xml FILE WITH SAME NAME           *
+// *                                        *
+// ******************************************
+
+
+#include "stdafx.h"
+#include "runtime/store/maps.h"
+#include "functions/func_maps.h"
+
+
+namespace zorba{
+
+
+
+PlanIter_t zorba_store_data_structure_unordered_map_create::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new MapCreateIterator(sctx, loc, argv);
+}
+
+PlanIter_t zorba_store_data_structure_unordered_map_delete::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new MapDestroyIterator(sctx, loc, argv);
+}
+
+PlanIter_t zorba_store_data_structure_unordered_map_get::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new MapGetIterator(sctx, loc, argv);
+}
+
+PlanIter_t zorba_store_data_structure_unordered_map_insert::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new MapInsertIterator(sctx, loc, argv);
+}
+
+PlanIter_t zorba_store_data_structure_unordered_map_remove::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new MapRemoveIterator(sctx, loc, argv);
+}
+
+PlanIter_t zorba_store_data_structure_unordered_map_keys::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new MapKeysIterator(sctx, loc, argv);
+}
+
+PlanIter_t zorba_store_data_structure_unordered_map_size::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new MapSizeIterator(sctx, loc, argv);
+}
+
+PlanIter_t zorba_store_data_structure_unordered_map_available_maps::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new AvailableMapsIterator(sctx, loc, argv);
+}
+
+void populate_context_maps(static_context* sctx)
+{
+  {
+    std::vector<xqtref_t> lParamTypes;
+    lParamTypes.push_back(GENV_TYPESYSTEM.QNAME_TYPE_ONE);
+    lParamTypes.push_back(GENV_TYPESYSTEM.QNAME_TYPE_ONE);
+
+    DECL_WITH_KIND(sctx, zorba_store_data_structure_unordered_map_create,
+        (createQName("http://www.zorba-xquery.com/modules/store/data-structures/unordered-map","","create";), 
+        lParamTypes, GENV_TYPESYSTEM.EMPTY_TYPE, true),
+        FunctionConsts::ZORBA_STORE_DATA_STRUCTURE_UNORDERED_MAP_CREATE_N);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, zorba_store_data_structure_unordered_map_delete,
+        (createQName("http://www.zorba-xquery.com/modules/store/data-structures/unordered-map","","delete";), 
+        GENV_TYPESYSTEM.QNAME_TYPE_ONE, 
+        GENV_TYPESYSTEM.EMPTY_TYPE),
+        FunctionConsts::ZORBA_STORE_DATA_STRUCTURE_UNORDERED_MAP_DELETE_1);
+
+  }
+
+
+  {
+    std::vector<xqtref_t> lParamTypes;
+    lParamTypes.push_back(GENV_TYPESYSTEM.QNAME_TYPE_ONE);
+    lParamTypes.push_back(GENV_TYPESYSTEM.ANY_ATOMIC_TYPE_QUESTION);
+
+    DECL_WITH_KIND(sctx, zorba_store_data_structure_unordered_map_get,
+        (createQName("http://www.zorba-xquery.com/modules/store/data-structures/unordered-map","","get";), 
+        lParamTypes, GENV_TYPESYSTEM.ITEM_TYPE_STAR, true),
+        FunctionConsts::ZORBA_STORE_DATA_STRUCTURE_UNORDERED_MAP_GET_N);
+
+  }
+
+
+  {
+    std::vector<xqtref_t> lParamTypes;
+    lParamTypes.push_back(GENV_TYPESYSTEM.QNAME_TYPE_ONE);
+    lParamTypes.push_back(GENV_TYPESYSTEM.ITEM_TYPE_STAR);
+    lParamTypes.push_back(GENV_TYPESYSTEM.ANY_ATOMIC_TYPE_QUESTION);
+
+    DECL_WITH_KIND(sctx, zorba_store_data_structure_unordered_map_insert,
+        (createQName("http://www.zorba-xquery.com/modules/store/data-structures/unordered-map","","insert";), 
+        lParamTypes, GENV_TYPESYSTEM.EMPTY_TYPE, true),
+        FunctionConsts::ZORBA_STORE_DATA_STRUCTURE_UNORDERED_MAP_INSERT_N);
+
+  }
+
+
+  {
+    std::vector<xqtref_t> lParamTypes;
+    lParamTypes.push_back(GENV_TYPESYSTEM.QNAME_TYPE_ONE);
+    lParamTypes.push_back(GENV_TYPESYSTEM.ANY_ATOMIC_TYPE_QUESTION);
+
+    DECL_WITH_KIND(sctx, zorba_store_data_structure_unordered_map_remove,
+        (createQName("http://www.zorba-xquery.com/modules/store/data-structures/unordered-map","","remove";), 
+        lParamTypes, GENV_TYPESYSTEM.EMPTY_TYPE, true),
+        FunctionConsts::ZORBA_STORE_DATA_STRUCTURE_UNORDERED_MAP_REMOVE_N);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, zorba_store_data_structure_unordered_map_keys,
+        (createQName("http://www.zorba-xquery.com/modules/store/data-structures/unordered-map","","keys";), 
+        GENV_TYPESYSTEM.QNAME_TYPE_ONE, 
+        GENV_TYPESYSTEM.ANY_NODE_TYPE_STAR),
+        FunctionConsts::ZORBA_STORE_DATA_STRUCTURE_UNORDERED_MAP_KEYS_1);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, zorba_store_data_structure_unordered_map_size,
+        (createQName("http://www.zorba-xquery.com/modules/store/data-structures/unordered-map","","size";), 
+        GENV_TYPESYSTEM.QNAME_TYPE_ONE, 
+        GENV_TYPESYSTEM.INTEGER_TYPE_ONE),
+        FunctionConsts::ZORBA_STORE_DATA_STRUCTURE_UNORDERED_MAP_SIZE_1);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, zorba_store_data_structure_unordered_map_available_maps,
+        (createQName("http://www.zorba-xquery.com/modules/store/data-structures/unordered-map","","available-maps";), 
+        GENV_TYPESYSTEM.QNAME_TYPE_STAR),
+        FunctionConsts::ZORBA_STORE_DATA_STRUCTURE_UNORDERED_MAP_AVAILABLE_MAPS_0);
+
+  }
+
+}
+
+
+}
+
+
+

=== modified file 'src/functions/pregenerated/func_maps.h'
--- src/functions/pregenerated/func_maps.h	2012-03-28 05:19:57 +0000
+++ src/functions/pregenerated/func_maps.h	2012-04-13 09:35:12 +0000
@@ -1,193 +1,193 @@
-/*
- * Copyright 2006-2008 The FLWOR Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- 
-// ******************************************
-// *                                        *
-// * THIS IS A GENERATED FILE. DO NOT EDIT! *
-// * SEE .xml FILE WITH SAME NAME           *
-// *                                        *
-// ******************************************
-
-
-#ifndef ZORBA_FUNCTIONS_MAPS_H
-#define ZORBA_FUNCTIONS_MAPS_H
-
-
-#include "common/shared_types.h"
-#include "functions/function_impl.h"
-
-
-namespace zorba {
-
-
-void populate_context_maps(static_context* sctx);
-
-
-
-
-//zorba-store-data-structure-unordered-map:create
-class zorba_store_data_structure_unordered_map_create : public function
-{
-public:
-  zorba_store_data_structure_unordered_map_create(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-
-  }
-
-  short getScriptingKind() const { return SEQUENTIAL_FUNC_EXPR; }
-
-  bool accessesDynCtx() const { return true; }
-
-  CODEGEN_DECL();
-};
-
-
-//zorba-store-data-structure-unordered-map:delete
-class zorba_store_data_structure_unordered_map_delete : public function
-{
-public:
-  zorba_store_data_structure_unordered_map_delete(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-
-  }
-
-  short getScriptingKind() const { return SEQUENTIAL_FUNC_EXPR; }
-
-  bool accessesDynCtx() const { return true; }
-
-  CODEGEN_DECL();
-};
-
-
-//zorba-store-data-structure-unordered-map:get
-class zorba_store_data_structure_unordered_map_get : public function
-{
-public:
-  zorba_store_data_structure_unordered_map_get(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-
-  }
-
-  bool accessesDynCtx() const { return true; }
-
-  CODEGEN_DECL();
-};
-
-
-//zorba-store-data-structure-unordered-map:insert
-class zorba_store_data_structure_unordered_map_insert : public function
-{
-public:
-  zorba_store_data_structure_unordered_map_insert(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-
-  }
-
-  short getScriptingKind() const { return SEQUENTIAL_FUNC_EXPR; }
-
-  bool accessesDynCtx() const { return true; }
-
-  CODEGEN_DECL();
-};
-
-
-//zorba-store-data-structure-unordered-map:remove
-class zorba_store_data_structure_unordered_map_remove : public function
-{
-public:
-  zorba_store_data_structure_unordered_map_remove(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-
-  }
-
-  short getScriptingKind() const { return SEQUENTIAL_FUNC_EXPR; }
-
-  bool accessesDynCtx() const { return true; }
-
-  CODEGEN_DECL();
-};
-
-
-//zorba-store-data-structure-unordered-map:keys
-class zorba_store_data_structure_unordered_map_keys : public function
-{
-public:
-  zorba_store_data_structure_unordered_map_keys(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-
-  }
-
-  bool accessesDynCtx() const { return true; }
-
-  CODEGEN_DECL();
-};
-
-
-//zorba-store-data-structure-unordered-map:size
-class zorba_store_data_structure_unordered_map_size : public function
-{
-public:
-  zorba_store_data_structure_unordered_map_size(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-
-  }
-
-  bool accessesDynCtx() const { return true; }
-
-  CODEGEN_DECL();
-};
-
-
-//zorba-store-data-structure-unordered-map:available-maps
-class zorba_store_data_structure_unordered_map_available_maps : public function
-{
-public:
-  zorba_store_data_structure_unordered_map_available_maps(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-
-  }
-
-  bool accessesDynCtx() const { return true; }
-
-  CODEGEN_DECL();
-};
-
-
-} //namespace zorba
-
-
-#endif
-/*
- * Local variables:
- * mode: c++
- * End:
- */ 
+/*
+ * Copyright 2006-2008 The FLWOR Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+ 
+// ******************************************
+// *                                        *
+// * THIS IS A GENERATED FILE. DO NOT EDIT! *
+// * SEE .xml FILE WITH SAME NAME           *
+// *                                        *
+// ******************************************
+
+
+#ifndef ZORBA_FUNCTIONS_MAPS_H
+#define ZORBA_FUNCTIONS_MAPS_H
+
+
+#include "common/shared_types.h"
+#include "functions/function_impl.h"
+
+
+namespace zorba {
+
+
+void populate_context_maps(static_context* sctx);
+
+
+
+
+//zorba-store-data-structure-unordered-map:create
+class zorba_store_data_structure_unordered_map_create : public function
+{
+public:
+  zorba_store_data_structure_unordered_map_create(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  short getScriptingKind() const { return SEQUENTIAL_FUNC_EXPR; }
+
+  bool accessesDynCtx() const { return true; }
+
+  CODEGEN_DECL();
+};
+
+
+//zorba-store-data-structure-unordered-map:delete
+class zorba_store_data_structure_unordered_map_delete : public function
+{
+public:
+  zorba_store_data_structure_unordered_map_delete(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  short getScriptingKind() const { return SEQUENTIAL_FUNC_EXPR; }
+
+  bool accessesDynCtx() const { return true; }
+
+  CODEGEN_DECL();
+};
+
+
+//zorba-store-data-structure-unordered-map:get
+class zorba_store_data_structure_unordered_map_get : public function
+{
+public:
+  zorba_store_data_structure_unordered_map_get(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  bool accessesDynCtx() const { return true; }
+
+  CODEGEN_DECL();
+};
+
+
+//zorba-store-data-structure-unordered-map:insert
+class zorba_store_data_structure_unordered_map_insert : public function
+{
+public:
+  zorba_store_data_structure_unordered_map_insert(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  short getScriptingKind() const { return SEQUENTIAL_FUNC_EXPR; }
+
+  bool accessesDynCtx() const { return true; }
+
+  CODEGEN_DECL();
+};
+
+
+//zorba-store-data-structure-unordered-map:remove
+class zorba_store_data_structure_unordered_map_remove : public function
+{
+public:
+  zorba_store_data_structure_unordered_map_remove(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  short getScriptingKind() const { return SEQUENTIAL_FUNC_EXPR; }
+
+  bool accessesDynCtx() const { return true; }
+
+  CODEGEN_DECL();
+};
+
+
+//zorba-store-data-structure-unordered-map:keys
+class zorba_store_data_structure_unordered_map_keys : public function
+{
+public:
+  zorba_store_data_structure_unordered_map_keys(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  bool accessesDynCtx() const { return true; }
+
+  CODEGEN_DECL();
+};
+
+
+//zorba-store-data-structure-unordered-map:size
+class zorba_store_data_structure_unordered_map_size : public function
+{
+public:
+  zorba_store_data_structure_unordered_map_size(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  bool accessesDynCtx() const { return true; }
+
+  CODEGEN_DECL();
+};
+
+
+//zorba-store-data-structure-unordered-map:available-maps
+class zorba_store_data_structure_unordered_map_available_maps : public function
+{
+public:
+  zorba_store_data_structure_unordered_map_available_maps(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  bool accessesDynCtx() const { return true; }
+
+  CODEGEN_DECL();
+};
+
+
+} //namespace zorba
+
+
+#endif
+/*
+ * Local variables:
+ * mode: c++
+ * End:
+ */ 

=== modified file 'src/functions/pregenerated/func_maths.cpp'
--- src/functions/pregenerated/func_maths.cpp	2012-03-28 23:58:23 +0000
+++ src/functions/pregenerated/func_maths.cpp	2012-04-13 09:35:12 +0000
@@ -1,616 +1,616 @@
-/*
- * Copyright 2006-2008 The FLWOR Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- 
-// ******************************************
-// *                                        *
-// * THIS IS A GENERATED FILE. DO NOT EDIT! *
-// * SEE .xml FILE WITH SAME NAME           *
-// *                                        *
-// ******************************************
-
-
-#include "stdafx.h"
-#include "runtime/maths/maths.h"
-#include "functions/func_maths.h"
-
-
-namespace zorba{
-
-
-
-PlanIter_t math_sqrt::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new SqrtIterator(sctx, loc, argv[0]);
-}
-
-PlanIter_t math_exp::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new ExpIterator(sctx, loc, argv[0]);
-}
-
-PlanIter_t math_exp10::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new Exp10Iterator(sctx, loc, argv[0]);
-}
-
-PlanIter_t math_log::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new LogIterator(sctx, loc, argv[0]);
-}
-
-PlanIter_t math_log10::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new Log10Iterator(sctx, loc, argv[0]);
-}
-
-PlanIter_t math_sin::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new SinIterator(sctx, loc, argv[0]);
-}
-
-PlanIter_t math_cos::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new CosIterator(sctx, loc, argv[0]);
-}
-
-PlanIter_t math_tan::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new TanIterator(sctx, loc, argv[0]);
-}
-
-PlanIter_t math_asin::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new ArcSinIterator(sctx, loc, argv[0]);
-}
-
-PlanIter_t math_acos::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new ArcCosIterator(sctx, loc, argv[0]);
-}
-
-PlanIter_t math_atan::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new ArcTanIterator(sctx, loc, argv[0]);
-}
-
-PlanIter_t math_atan2::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new Atan2Iterator(sctx, loc, argv[0], argv[1]);
-}
-
-PlanIter_t fn_zorba_math_cosh::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new CoshIterator(sctx, loc, argv[0]);
-}
-
-PlanIter_t fn_zorba_math_acosh::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new AcoshIterator(sctx, loc, argv[0]);
-}
-
-PlanIter_t fn_zorba_math_fmod::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new FmodIterator(sctx, loc, argv[0], argv[1]);
-}
-
-PlanIter_t fn_zorba_math_ldexp::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new LdexpIterator(sctx, loc, argv[0], argv[1]);
-}
-
-PlanIter_t math_pow::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new PowIterator(sctx, loc, argv[0], argv[1]);
-}
-
-PlanIter_t fn_zorba_math_sinh::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new SinhIterator(sctx, loc, argv[0]);
-}
-
-PlanIter_t fn_zorba_math_asinh::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new AsinhIterator(sctx, loc, argv[0]);
-}
-
-PlanIter_t fn_zorba_math_tanh::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new TanhIterator(sctx, loc, argv[0]);
-}
-
-PlanIter_t fn_zorba_math_atanh::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new AtanhIterator(sctx, loc, argv[0]);
-}
-
-PlanIter_t math_pi::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new PiNumberIterator(sctx, loc);
-}
-
-PlanIter_t fn_zorba_math_is_inf::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new IsInfIterator(sctx, loc, argv[0]);
-}
-
-PlanIter_t fn_zorba_math_is_nan::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new IsNaNIterator(sctx, loc, argv[0]);
-}
-
-PlanIter_t fn_zorba_math_modf::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new ModfIterator(sctx, loc, argv[0]);
-}
-
-PlanIter_t fn_zorba_math_frexp::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new FrexpIterator(sctx, loc, argv[0]);
-}
-
-void populate_context_maths(static_context* sctx)
-{
-  {
-    
-
-    DECL_WITH_KIND(sctx, math_sqrt,
-        (createQName("http://www.w3.org/2005/xpath-functions/math","","sqrt";), 
-        GENV_TYPESYSTEM.DOUBLE_TYPE_QUESTION, 
-        GENV_TYPESYSTEM.DOUBLE_TYPE_QUESTION),
-        FunctionConsts::MATH_SQRT_1);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, math_exp,
-        (createQName("http://www.w3.org/2005/xpath-functions/math","","exp";), 
-        GENV_TYPESYSTEM.DOUBLE_TYPE_QUESTION, 
-        GENV_TYPESYSTEM.DOUBLE_TYPE_QUESTION),
-        FunctionConsts::MATH_EXP_1);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, math_exp10,
-        (createQName("http://www.w3.org/2005/xpath-functions/math","","exp10";), 
-        GENV_TYPESYSTEM.DOUBLE_TYPE_QUESTION, 
-        GENV_TYPESYSTEM.DOUBLE_TYPE_QUESTION),
-        FunctionConsts::MATH_EXP10_1);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, math_log,
-        (createQName("http://www.w3.org/2005/xpath-functions/math","","log";), 
-        GENV_TYPESYSTEM.DOUBLE_TYPE_QUESTION, 
-        GENV_TYPESYSTEM.DOUBLE_TYPE_QUESTION),
-        FunctionConsts::MATH_LOG_1);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, math_log10,
-        (createQName("http://www.w3.org/2005/xpath-functions/math","","log10";), 
-        GENV_TYPESYSTEM.DOUBLE_TYPE_QUESTION, 
-        GENV_TYPESYSTEM.DOUBLE_TYPE_QUESTION),
-        FunctionConsts::MATH_LOG10_1);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, math_sin,
-        (createQName("http://www.w3.org/2005/xpath-functions/math","","sin";), 
-        GENV_TYPESYSTEM.DOUBLE_TYPE_QUESTION, 
-        GENV_TYPESYSTEM.DOUBLE_TYPE_QUESTION),
-        FunctionConsts::MATH_SIN_1);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, math_cos,
-        (createQName("http://www.w3.org/2005/xpath-functions/math","","cos";), 
-        GENV_TYPESYSTEM.DOUBLE_TYPE_QUESTION, 
-        GENV_TYPESYSTEM.DOUBLE_TYPE_QUESTION),
-        FunctionConsts::MATH_COS_1);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, math_tan,
-        (createQName("http://www.w3.org/2005/xpath-functions/math","","tan";), 
-        GENV_TYPESYSTEM.DOUBLE_TYPE_QUESTION, 
-        GENV_TYPESYSTEM.DOUBLE_TYPE_QUESTION),
-        FunctionConsts::MATH_TAN_1);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, math_asin,
-        (createQName("http://www.w3.org/2005/xpath-functions/math","","asin";), 
-        GENV_TYPESYSTEM.DOUBLE_TYPE_QUESTION, 
-        GENV_TYPESYSTEM.DOUBLE_TYPE_QUESTION),
-        FunctionConsts::MATH_ASIN_1);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, math_acos,
-        (createQName("http://www.w3.org/2005/xpath-functions/math","","acos";), 
-        GENV_TYPESYSTEM.DOUBLE_TYPE_QUESTION, 
-        GENV_TYPESYSTEM.DOUBLE_TYPE_QUESTION),
-        FunctionConsts::MATH_ACOS_1);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, math_atan,
-        (createQName("http://www.w3.org/2005/xpath-functions/math","","atan";), 
-        GENV_TYPESYSTEM.DOUBLE_TYPE_QUESTION, 
-        GENV_TYPESYSTEM.DOUBLE_TYPE_QUESTION),
-        FunctionConsts::MATH_ATAN_1);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, math_atan2,
-        (createQName("http://www.w3.org/2005/xpath-functions/math","","atan2";), 
-        GENV_TYPESYSTEM.DOUBLE_TYPE_ONE, 
-        GENV_TYPESYSTEM.DOUBLE_TYPE_ONE, 
-        GENV_TYPESYSTEM.DOUBLE_TYPE_ONE),
-        FunctionConsts::MATH_ATAN2_2);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, fn_zorba_math_cosh,
-        (createQName("http://www.zorba-xquery.com/modules/math","","cosh";), 
-        GENV_TYPESYSTEM.DOUBLE_TYPE_ONE, 
-        GENV_TYPESYSTEM.DOUBLE_TYPE_ONE),
-        FunctionConsts::FN_ZORBA_MATH_COSH_1);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, fn_zorba_math_acosh,
-        (createQName("http://www.zorba-xquery.com/modules/math","","acosh";), 
-        GENV_TYPESYSTEM.DOUBLE_TYPE_ONE, 
-        GENV_TYPESYSTEM.DOUBLE_TYPE_ONE),
-        FunctionConsts::FN_ZORBA_MATH_ACOSH_1);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, fn_zorba_math_fmod,
-        (createQName("http://www.zorba-xquery.com/modules/math","","fmod";), 
-        GENV_TYPESYSTEM.DOUBLE_TYPE_ONE, 
-        GENV_TYPESYSTEM.DOUBLE_TYPE_ONE, 
-        GENV_TYPESYSTEM.DOUBLE_TYPE_ONE),
-        FunctionConsts::FN_ZORBA_MATH_FMOD_2);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, fn_zorba_math_ldexp,
-        (createQName("http://www.zorba-xquery.com/modules/math","","ldexp";), 
-        GENV_TYPESYSTEM.DOUBLE_TYPE_ONE, 
-        GENV_TYPESYSTEM.INTEGER_TYPE_ONE, 
-        GENV_TYPESYSTEM.DOUBLE_TYPE_ONE),
-        FunctionConsts::FN_ZORBA_MATH_LDEXP_2);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, math_pow,
-        (createQName("http://www.w3.org/2005/xpath-functions/math","","pow";), 
-        GENV_TYPESYSTEM.DOUBLE_TYPE_QUESTION, 
-        GENV_TYPESYSTEM.ANY_ATOMIC_TYPE_ONE, 
-        GENV_TYPESYSTEM.DOUBLE_TYPE_QUESTION),
-        FunctionConsts::MATH_POW_2);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, fn_zorba_math_sinh,
-        (createQName("http://www.zorba-xquery.com/modules/math","","sinh";), 
-        GENV_TYPESYSTEM.DOUBLE_TYPE_ONE, 
-        GENV_TYPESYSTEM.DOUBLE_TYPE_ONE),
-        FunctionConsts::FN_ZORBA_MATH_SINH_1);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, fn_zorba_math_asinh,
-        (createQName("http://www.zorba-xquery.com/modules/math","","asinh";), 
-        GENV_TYPESYSTEM.DOUBLE_TYPE_ONE, 
-        GENV_TYPESYSTEM.DOUBLE_TYPE_ONE),
-        FunctionConsts::FN_ZORBA_MATH_ASINH_1);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, fn_zorba_math_tanh,
-        (createQName("http://www.zorba-xquery.com/modules/math","","tanh";), 
-        GENV_TYPESYSTEM.DOUBLE_TYPE_ONE, 
-        GENV_TYPESYSTEM.DOUBLE_TYPE_ONE),
-        FunctionConsts::FN_ZORBA_MATH_TANH_1);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, fn_zorba_math_atanh,
-        (createQName("http://www.zorba-xquery.com/modules/math","","atanh";), 
-        GENV_TYPESYSTEM.DOUBLE_TYPE_ONE, 
-        GENV_TYPESYSTEM.DOUBLE_TYPE_ONE),
-        FunctionConsts::FN_ZORBA_MATH_ATANH_1);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, math_pi,
-        (createQName("http://www.w3.org/2005/xpath-functions/math","","pi";), 
-        GENV_TYPESYSTEM.DOUBLE_TYPE_ONE),
-        FunctionConsts::MATH_PI_0);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, fn_zorba_math_is_inf,
-        (createQName("http://www.zorba-xquery.com/modules/math","","is_inf";), 
-        GENV_TYPESYSTEM.DOUBLE_TYPE_ONE, 
-        GENV_TYPESYSTEM.BOOLEAN_TYPE_ONE),
-        FunctionConsts::FN_ZORBA_MATH_IS_INF_1);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, fn_zorba_math_is_nan,
-        (createQName("http://www.zorba-xquery.com/modules/math","","is_nan";), 
-        GENV_TYPESYSTEM.DOUBLE_TYPE_ONE, 
-        GENV_TYPESYSTEM.BOOLEAN_TYPE_ONE),
-        FunctionConsts::FN_ZORBA_MATH_IS_NAN_1);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, fn_zorba_math_modf,
-        (createQName("http://www.zorba-xquery.com/modules/math","","modf";), 
-        GENV_TYPESYSTEM.DOUBLE_TYPE_ONE, 
-        GENV_TYPESYSTEM.DOUBLE_TYPE_PLUS),
-        FunctionConsts::FN_ZORBA_MATH_MODF_1);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, fn_zorba_math_frexp,
-        (createQName("http://www.zorba-xquery.com/modules/math","","frexp";), 
-        GENV_TYPESYSTEM.DOUBLE_TYPE_ONE, 
-        GENV_TYPESYSTEM.DOUBLE_TYPE_PLUS),
-        FunctionConsts::FN_ZORBA_MATH_FREXP_1);
-
-  }
-
-}
-
-
-}
-
-
-
+/*
+ * Copyright 2006-2008 The FLWOR Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+ 
+// ******************************************
+// *                                        *
+// * THIS IS A GENERATED FILE. DO NOT EDIT! *
+// * SEE .xml FILE WITH SAME NAME           *
+// *                                        *
+// ******************************************
+
+
+#include "stdafx.h"
+#include "runtime/maths/maths.h"
+#include "functions/func_maths.h"
+
+
+namespace zorba{
+
+
+
+PlanIter_t math_sqrt::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new SqrtIterator(sctx, loc, argv[0]);
+}
+
+PlanIter_t math_exp::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new ExpIterator(sctx, loc, argv[0]);
+}
+
+PlanIter_t math_exp10::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new Exp10Iterator(sctx, loc, argv[0]);
+}
+
+PlanIter_t math_log::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new LogIterator(sctx, loc, argv[0]);
+}
+
+PlanIter_t math_log10::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new Log10Iterator(sctx, loc, argv[0]);
+}
+
+PlanIter_t math_sin::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new SinIterator(sctx, loc, argv[0]);
+}
+
+PlanIter_t math_cos::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new CosIterator(sctx, loc, argv[0]);
+}
+
+PlanIter_t math_tan::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new TanIterator(sctx, loc, argv[0]);
+}
+
+PlanIter_t math_asin::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new ArcSinIterator(sctx, loc, argv[0]);
+}
+
+PlanIter_t math_acos::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new ArcCosIterator(sctx, loc, argv[0]);
+}
+
+PlanIter_t math_atan::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new ArcTanIterator(sctx, loc, argv[0]);
+}
+
+PlanIter_t math_atan2::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new Atan2Iterator(sctx, loc, argv[0], argv[1]);
+}
+
+PlanIter_t fn_zorba_math_cosh::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new CoshIterator(sctx, loc, argv[0]);
+}
+
+PlanIter_t fn_zorba_math_acosh::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new AcoshIterator(sctx, loc, argv[0]);
+}
+
+PlanIter_t fn_zorba_math_fmod::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new FmodIterator(sctx, loc, argv[0], argv[1]);
+}
+
+PlanIter_t fn_zorba_math_ldexp::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new LdexpIterator(sctx, loc, argv[0], argv[1]);
+}
+
+PlanIter_t math_pow::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new PowIterator(sctx, loc, argv[0], argv[1]);
+}
+
+PlanIter_t fn_zorba_math_sinh::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new SinhIterator(sctx, loc, argv[0]);
+}
+
+PlanIter_t fn_zorba_math_asinh::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new AsinhIterator(sctx, loc, argv[0]);
+}
+
+PlanIter_t fn_zorba_math_tanh::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new TanhIterator(sctx, loc, argv[0]);
+}
+
+PlanIter_t fn_zorba_math_atanh::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new AtanhIterator(sctx, loc, argv[0]);
+}
+
+PlanIter_t math_pi::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new PiNumberIterator(sctx, loc);
+}
+
+PlanIter_t fn_zorba_math_is_inf::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new IsInfIterator(sctx, loc, argv[0]);
+}
+
+PlanIter_t fn_zorba_math_is_nan::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new IsNaNIterator(sctx, loc, argv[0]);
+}
+
+PlanIter_t fn_zorba_math_modf::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new ModfIterator(sctx, loc, argv[0]);
+}
+
+PlanIter_t fn_zorba_math_frexp::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new FrexpIterator(sctx, loc, argv[0]);
+}
+
+void populate_context_maths(static_context* sctx)
+{
+  {
+    
+
+    DECL_WITH_KIND(sctx, math_sqrt,
+        (createQName("http://www.w3.org/2005/xpath-functions/math","","sqrt";), 
+        GENV_TYPESYSTEM.DOUBLE_TYPE_QUESTION, 
+        GENV_TYPESYSTEM.DOUBLE_TYPE_QUESTION),
+        FunctionConsts::MATH_SQRT_1);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, math_exp,
+        (createQName("http://www.w3.org/2005/xpath-functions/math","","exp";), 
+        GENV_TYPESYSTEM.DOUBLE_TYPE_QUESTION, 
+        GENV_TYPESYSTEM.DOUBLE_TYPE_QUESTION),
+        FunctionConsts::MATH_EXP_1);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, math_exp10,
+        (createQName("http://www.w3.org/2005/xpath-functions/math","","exp10";), 
+        GENV_TYPESYSTEM.DOUBLE_TYPE_QUESTION, 
+        GENV_TYPESYSTEM.DOUBLE_TYPE_QUESTION),
+        FunctionConsts::MATH_EXP10_1);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, math_log,
+        (createQName("http://www.w3.org/2005/xpath-functions/math","","log";), 
+        GENV_TYPESYSTEM.DOUBLE_TYPE_QUESTION, 
+        GENV_TYPESYSTEM.DOUBLE_TYPE_QUESTION),
+        FunctionConsts::MATH_LOG_1);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, math_log10,
+        (createQName("http://www.w3.org/2005/xpath-functions/math","","log10";), 
+        GENV_TYPESYSTEM.DOUBLE_TYPE_QUESTION, 
+        GENV_TYPESYSTEM.DOUBLE_TYPE_QUESTION),
+        FunctionConsts::MATH_LOG10_1);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, math_sin,
+        (createQName("http://www.w3.org/2005/xpath-functions/math","","sin";), 
+        GENV_TYPESYSTEM.DOUBLE_TYPE_QUESTION, 
+        GENV_TYPESYSTEM.DOUBLE_TYPE_QUESTION),
+        FunctionConsts::MATH_SIN_1);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, math_cos,
+        (createQName("http://www.w3.org/2005/xpath-functions/math","","cos";), 
+        GENV_TYPESYSTEM.DOUBLE_TYPE_QUESTION, 
+        GENV_TYPESYSTEM.DOUBLE_TYPE_QUESTION),
+        FunctionConsts::MATH_COS_1);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, math_tan,
+        (createQName("http://www.w3.org/2005/xpath-functions/math","","tan";), 
+        GENV_TYPESYSTEM.DOUBLE_TYPE_QUESTION, 
+        GENV_TYPESYSTEM.DOUBLE_TYPE_QUESTION),
+        FunctionConsts::MATH_TAN_1);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, math_asin,
+        (createQName("http://www.w3.org/2005/xpath-functions/math","","asin";), 
+        GENV_TYPESYSTEM.DOUBLE_TYPE_QUESTION, 
+        GENV_TYPESYSTEM.DOUBLE_TYPE_QUESTION),
+        FunctionConsts::MATH_ASIN_1);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, math_acos,
+        (createQName("http://www.w3.org/2005/xpath-functions/math","","acos";), 
+        GENV_TYPESYSTEM.DOUBLE_TYPE_QUESTION, 
+        GENV_TYPESYSTEM.DOUBLE_TYPE_QUESTION),
+        FunctionConsts::MATH_ACOS_1);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, math_atan,
+        (createQName("http://www.w3.org/2005/xpath-functions/math","","atan";), 
+        GENV_TYPESYSTEM.DOUBLE_TYPE_QUESTION, 
+        GENV_TYPESYSTEM.DOUBLE_TYPE_QUESTION),
+        FunctionConsts::MATH_ATAN_1);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, math_atan2,
+        (createQName("http://www.w3.org/2005/xpath-functions/math","","atan2";), 
+        GENV_TYPESYSTEM.DOUBLE_TYPE_ONE, 
+        GENV_TYPESYSTEM.DOUBLE_TYPE_ONE, 
+        GENV_TYPESYSTEM.DOUBLE_TYPE_ONE),
+        FunctionConsts::MATH_ATAN2_2);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_zorba_math_cosh,
+        (createQName("http://www.zorba-xquery.com/modules/math","","cosh";), 
+        GENV_TYPESYSTEM.DOUBLE_TYPE_ONE, 
+        GENV_TYPESYSTEM.DOUBLE_TYPE_ONE),
+        FunctionConsts::FN_ZORBA_MATH_COSH_1);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_zorba_math_acosh,
+        (createQName("http://www.zorba-xquery.com/modules/math","","acosh";), 
+        GENV_TYPESYSTEM.DOUBLE_TYPE_ONE, 
+        GENV_TYPESYSTEM.DOUBLE_TYPE_ONE),
+        FunctionConsts::FN_ZORBA_MATH_ACOSH_1);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_zorba_math_fmod,
+        (createQName("http://www.zorba-xquery.com/modules/math","","fmod";), 
+        GENV_TYPESYSTEM.DOUBLE_TYPE_ONE, 
+        GENV_TYPESYSTEM.DOUBLE_TYPE_ONE, 
+        GENV_TYPESYSTEM.DOUBLE_TYPE_ONE),
+        FunctionConsts::FN_ZORBA_MATH_FMOD_2);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_zorba_math_ldexp,
+        (createQName("http://www.zorba-xquery.com/modules/math","","ldexp";), 
+        GENV_TYPESYSTEM.DOUBLE_TYPE_ONE, 
+        GENV_TYPESYSTEM.INTEGER_TYPE_ONE, 
+        GENV_TYPESYSTEM.DOUBLE_TYPE_ONE),
+        FunctionConsts::FN_ZORBA_MATH_LDEXP_2);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, math_pow,
+        (createQName("http://www.w3.org/2005/xpath-functions/math","","pow";), 
+        GENV_TYPESYSTEM.DOUBLE_TYPE_QUESTION, 
+        GENV_TYPESYSTEM.ANY_ATOMIC_TYPE_ONE, 
+        GENV_TYPESYSTEM.DOUBLE_TYPE_QUESTION),
+        FunctionConsts::MATH_POW_2);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_zorba_math_sinh,
+        (createQName("http://www.zorba-xquery.com/modules/math","","sinh";), 
+        GENV_TYPESYSTEM.DOUBLE_TYPE_ONE, 
+        GENV_TYPESYSTEM.DOUBLE_TYPE_ONE),
+        FunctionConsts::FN_ZORBA_MATH_SINH_1);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_zorba_math_asinh,
+        (createQName("http://www.zorba-xquery.com/modules/math","","asinh";), 
+        GENV_TYPESYSTEM.DOUBLE_TYPE_ONE, 
+        GENV_TYPESYSTEM.DOUBLE_TYPE_ONE),
+        FunctionConsts::FN_ZORBA_MATH_ASINH_1);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_zorba_math_tanh,
+        (createQName("http://www.zorba-xquery.com/modules/math","","tanh";), 
+        GENV_TYPESYSTEM.DOUBLE_TYPE_ONE, 
+        GENV_TYPESYSTEM.DOUBLE_TYPE_ONE),
+        FunctionConsts::FN_ZORBA_MATH_TANH_1);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_zorba_math_atanh,
+        (createQName("http://www.zorba-xquery.com/modules/math","","atanh";), 
+        GENV_TYPESYSTEM.DOUBLE_TYPE_ONE, 
+        GENV_TYPESYSTEM.DOUBLE_TYPE_ONE),
+        FunctionConsts::FN_ZORBA_MATH_ATANH_1);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, math_pi,
+        (createQName("http://www.w3.org/2005/xpath-functions/math","","pi";), 
+        GENV_TYPESYSTEM.DOUBLE_TYPE_ONE),
+        FunctionConsts::MATH_PI_0);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_zorba_math_is_inf,
+        (createQName("http://www.zorba-xquery.com/modules/math","","is_inf";), 
+        GENV_TYPESYSTEM.DOUBLE_TYPE_ONE, 
+        GENV_TYPESYSTEM.BOOLEAN_TYPE_ONE),
+        FunctionConsts::FN_ZORBA_MATH_IS_INF_1);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_zorba_math_is_nan,
+        (createQName("http://www.zorba-xquery.com/modules/math","","is_nan";), 
+        GENV_TYPESYSTEM.DOUBLE_TYPE_ONE, 
+        GENV_TYPESYSTEM.BOOLEAN_TYPE_ONE),
+        FunctionConsts::FN_ZORBA_MATH_IS_NAN_1);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_zorba_math_modf,
+        (createQName("http://www.zorba-xquery.com/modules/math","","modf";), 
+        GENV_TYPESYSTEM.DOUBLE_TYPE_ONE, 
+        GENV_TYPESYSTEM.DOUBLE_TYPE_PLUS),
+        FunctionConsts::FN_ZORBA_MATH_MODF_1);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_zorba_math_frexp,
+        (createQName("http://www.zorba-xquery.com/modules/math","","frexp";), 
+        GENV_TYPESYSTEM.DOUBLE_TYPE_ONE, 
+        GENV_TYPESYSTEM.DOUBLE_TYPE_PLUS),
+        FunctionConsts::FN_ZORBA_MATH_FREXP_1);
+
+  }
+
+}
+
+
+}
+
+
+

=== modified file 'src/functions/pregenerated/func_maths.h'
--- src/functions/pregenerated/func_maths.h	2012-03-28 23:58:23 +0000
+++ src/functions/pregenerated/func_maths.h	2012-04-13 09:35:12 +0000
@@ -1,439 +1,439 @@
-/*
- * Copyright 2006-2008 The FLWOR Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- 
-// ******************************************
-// *                                        *
-// * THIS IS A GENERATED FILE. DO NOT EDIT! *
-// * SEE .xml FILE WITH SAME NAME           *
-// *                                        *
-// ******************************************
-
-
-#ifndef ZORBA_FUNCTIONS_MATHS_H
-#define ZORBA_FUNCTIONS_MATHS_H
-
-
-#include "common/shared_types.h"
-#include "functions/function_impl.h"
-
-
-namespace zorba {
-
-
-void populate_context_maths(static_context* sctx);
-
-
-
-
-//math:sqrt
-class math_sqrt : public function
-{
-public:
-  math_sqrt(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-
-  }
-
-  CODEGEN_DECL();
-};
-
-
-//math:exp
-class math_exp : public function
-{
-public:
-  math_exp(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-
-  }
-
-  CODEGEN_DECL();
-};
-
-
-//math:exp10
-class math_exp10 : public function
-{
-public:
-  math_exp10(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-
-  }
-
-  CODEGEN_DECL();
-};
-
-
-//math:log
-class math_log : public function
-{
-public:
-  math_log(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-
-  }
-
-  CODEGEN_DECL();
-};
-
-
-//math:log10
-class math_log10 : public function
-{
-public:
-  math_log10(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-
-  }
-
-  CODEGEN_DECL();
-};
-
-
-//math:sin
-class math_sin : public function
-{
-public:
-  math_sin(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-
-  }
-
-  CODEGEN_DECL();
-};
-
-
-//math:cos
-class math_cos : public function
-{
-public:
-  math_cos(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-
-  }
-
-  CODEGEN_DECL();
-};
-
-
-//math:tan
-class math_tan : public function
-{
-public:
-  math_tan(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-
-  }
-
-  CODEGEN_DECL();
-};
-
-
-//math:asin
-class math_asin : public function
-{
-public:
-  math_asin(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-
-  }
-
-  CODEGEN_DECL();
-};
-
-
-//math:acos
-class math_acos : public function
-{
-public:
-  math_acos(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-
-  }
-
-  CODEGEN_DECL();
-};
-
-
-//math:atan
-class math_atan : public function
-{
-public:
-  math_atan(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-
-  }
-
-  CODEGEN_DECL();
-};
-
-
-//math:atan2
-class math_atan2 : public function
-{
-public:
-  math_atan2(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-
-  }
-
-  CODEGEN_DECL();
-};
-
-
-//fn-zorba-math:cosh
-class fn_zorba_math_cosh : public function
-{
-public:
-  fn_zorba_math_cosh(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-
-  }
-
-  CODEGEN_DECL();
-};
-
-
-//fn-zorba-math:acosh
-class fn_zorba_math_acosh : public function
-{
-public:
-  fn_zorba_math_acosh(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-
-  }
-
-  CODEGEN_DECL();
-};
-
-
-//fn-zorba-math:fmod
-class fn_zorba_math_fmod : public function
-{
-public:
-  fn_zorba_math_fmod(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-
-  }
-
-  CODEGEN_DECL();
-};
-
-
-//fn-zorba-math:ldexp
-class fn_zorba_math_ldexp : public function
-{
-public:
-  fn_zorba_math_ldexp(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-
-  }
-
-  CODEGEN_DECL();
-};
-
-
-//math:pow
-class math_pow : public function
-{
-public:
-  math_pow(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-
-  }
-
-  CODEGEN_DECL();
-};
-
-
-//fn-zorba-math:sinh
-class fn_zorba_math_sinh : public function
-{
-public:
-  fn_zorba_math_sinh(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-
-  }
-
-  CODEGEN_DECL();
-};
-
-
-//fn-zorba-math:asinh
-class fn_zorba_math_asinh : public function
-{
-public:
-  fn_zorba_math_asinh(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-
-  }
-
-  CODEGEN_DECL();
-};
-
-
-//fn-zorba-math:tanh
-class fn_zorba_math_tanh : public function
-{
-public:
-  fn_zorba_math_tanh(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-
-  }
-
-  CODEGEN_DECL();
-};
-
-
-//fn-zorba-math:atanh
-class fn_zorba_math_atanh : public function
-{
-public:
-  fn_zorba_math_atanh(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-
-  }
-
-  CODEGEN_DECL();
-};
-
-
-//math:pi
-class math_pi : public function
-{
-public:
-  math_pi(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-
-  }
-
-  CODEGEN_DECL();
-};
-
-
-//fn-zorba-math:is_inf
-class fn_zorba_math_is_inf : public function
-{
-public:
-  fn_zorba_math_is_inf(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-
-  }
-
-  CODEGEN_DECL();
-};
-
-
-//fn-zorba-math:is_nan
-class fn_zorba_math_is_nan : public function
-{
-public:
-  fn_zorba_math_is_nan(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-
-  }
-
-  CODEGEN_DECL();
-};
-
-
-//fn-zorba-math:modf
-class fn_zorba_math_modf : public function
-{
-public:
-  fn_zorba_math_modf(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-
-  }
-
-  CODEGEN_DECL();
-};
-
-
-//fn-zorba-math:frexp
-class fn_zorba_math_frexp : public function
-{
-public:
-  fn_zorba_math_frexp(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-
-  }
-
-  CODEGEN_DECL();
-};
-
-
-} //namespace zorba
-
-
-#endif
-/*
- * Local variables:
- * mode: c++
- * End:
- */ 
+/*
+ * Copyright 2006-2008 The FLWOR Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+ 
+// ******************************************
+// *                                        *
+// * THIS IS A GENERATED FILE. DO NOT EDIT! *
+// * SEE .xml FILE WITH SAME NAME           *
+// *                                        *
+// ******************************************
+
+
+#ifndef ZORBA_FUNCTIONS_MATHS_H
+#define ZORBA_FUNCTIONS_MATHS_H
+
+
+#include "common/shared_types.h"
+#include "functions/function_impl.h"
+
+
+namespace zorba {
+
+
+void populate_context_maths(static_context* sctx);
+
+
+
+
+//math:sqrt
+class math_sqrt : public function
+{
+public:
+  math_sqrt(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  CODEGEN_DECL();
+};
+
+
+//math:exp
+class math_exp : public function
+{
+public:
+  math_exp(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  CODEGEN_DECL();
+};
+
+
+//math:exp10
+class math_exp10 : public function
+{
+public:
+  math_exp10(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  CODEGEN_DECL();
+};
+
+
+//math:log
+class math_log : public function
+{
+public:
+  math_log(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  CODEGEN_DECL();
+};
+
+
+//math:log10
+class math_log10 : public function
+{
+public:
+  math_log10(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  CODEGEN_DECL();
+};
+
+
+//math:sin
+class math_sin : public function
+{
+public:
+  math_sin(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  CODEGEN_DECL();
+};
+
+
+//math:cos
+class math_cos : public function
+{
+public:
+  math_cos(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  CODEGEN_DECL();
+};
+
+
+//math:tan
+class math_tan : public function
+{
+public:
+  math_tan(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  CODEGEN_DECL();
+};
+
+
+//math:asin
+class math_asin : public function
+{
+public:
+  math_asin(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  CODEGEN_DECL();
+};
+
+
+//math:acos
+class math_acos : public function
+{
+public:
+  math_acos(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  CODEGEN_DECL();
+};
+
+
+//math:atan
+class math_atan : public function
+{
+public:
+  math_atan(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  CODEGEN_DECL();
+};
+
+
+//math:atan2
+class math_atan2 : public function
+{
+public:
+  math_atan2(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  CODEGEN_DECL();
+};
+
+
+//fn-zorba-math:cosh
+class fn_zorba_math_cosh : public function
+{
+public:
+  fn_zorba_math_cosh(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  CODEGEN_DECL();
+};
+
+
+//fn-zorba-math:acosh
+class fn_zorba_math_acosh : public function
+{
+public:
+  fn_zorba_math_acosh(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  CODEGEN_DECL();
+};
+
+
+//fn-zorba-math:fmod
+class fn_zorba_math_fmod : public function
+{
+public:
+  fn_zorba_math_fmod(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  CODEGEN_DECL();
+};
+
+
+//fn-zorba-math:ldexp
+class fn_zorba_math_ldexp : public function
+{
+public:
+  fn_zorba_math_ldexp(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  CODEGEN_DECL();
+};
+
+
+//math:pow
+class math_pow : public function
+{
+public:
+  math_pow(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  CODEGEN_DECL();
+};
+
+
+//fn-zorba-math:sinh
+class fn_zorba_math_sinh : public function
+{
+public:
+  fn_zorba_math_sinh(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  CODEGEN_DECL();
+};
+
+
+//fn-zorba-math:asinh
+class fn_zorba_math_asinh : public function
+{
+public:
+  fn_zorba_math_asinh(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  CODEGEN_DECL();
+};
+
+
+//fn-zorba-math:tanh
+class fn_zorba_math_tanh : public function
+{
+public:
+  fn_zorba_math_tanh(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  CODEGEN_DECL();
+};
+
+
+//fn-zorba-math:atanh
+class fn_zorba_math_atanh : public function
+{
+public:
+  fn_zorba_math_atanh(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  CODEGEN_DECL();
+};
+
+
+//math:pi
+class math_pi : public function
+{
+public:
+  math_pi(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  CODEGEN_DECL();
+};
+
+
+//fn-zorba-math:is_inf
+class fn_zorba_math_is_inf : public function
+{
+public:
+  fn_zorba_math_is_inf(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  CODEGEN_DECL();
+};
+
+
+//fn-zorba-math:is_nan
+class fn_zorba_math_is_nan : public function
+{
+public:
+  fn_zorba_math_is_nan(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  CODEGEN_DECL();
+};
+
+
+//fn-zorba-math:modf
+class fn_zorba_math_modf : public function
+{
+public:
+  fn_zorba_math_modf(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  CODEGEN_DECL();
+};
+
+
+//fn-zorba-math:frexp
+class fn_zorba_math_frexp : public function
+{
+public:
+  fn_zorba_math_frexp(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  CODEGEN_DECL();
+};
+
+
+} //namespace zorba
+
+
+#endif
+/*
+ * Local variables:
+ * mode: c++
+ * End:
+ */ 

=== modified file 'src/functions/pregenerated/func_node_position.cpp'
--- src/functions/pregenerated/func_node_position.cpp	2012-03-28 23:58:23 +0000
+++ src/functions/pregenerated/func_node_position.cpp	2012-04-13 09:35:12 +0000
@@ -1,584 +1,584 @@
-/*
- * Copyright 2006-2008 The FLWOR Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- 
-// ******************************************
-// *                                        *
-// * THIS IS A GENERATED FILE. DO NOT EDIT! *
-// * SEE .xml FILE WITH SAME NAME           *
-// *                                        *
-// ******************************************
-
-
-#include "stdafx.h"
-#include "runtime/nodes/node_position.h"
-#include "functions/func_node_position.h"
-
-
-namespace zorba{
-
-
-
-PlanIter_t fn_zorba_pos_node_position::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new NodePositionIterator(sctx, loc, argv);
-}
-
-PlanIter_t fn_zorba_pos_ancestor_of::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new IsAncestorPositionIterator(sctx, loc, argv);
-}
-
-PlanIter_t fn_zorba_pos_following_sibling_of::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new IsFollowingSiblingPositionIterator(sctx, loc, argv);
-}
-
-PlanIter_t fn_zorba_pos_following_of::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new IsFollowingPositionIterator(sctx, loc, argv);
-}
-
-PlanIter_t fn_zorba_pos_in_subtree_of::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new IsInSubtreeOfPositionIterator(sctx, loc, argv);
-}
-
-PlanIter_t fn_zorba_pos_descendant_of::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new IsDescendantPositionIterator(sctx, loc, argv);
-}
-
-PlanIter_t fn_zorba_pos_preceding_sibling_of::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new IsPrecedingSiblingPositionIterator(sctx, loc, argv);
-}
-
-PlanIter_t fn_zorba_pos_preceding_of::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new IsPrecedingPositionIterator(sctx, loc, argv);
-}
-
-PlanIter_t fn_zorba_pos_child_of::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new IsChildPositionIterator(sctx, loc, argv);
-}
-
-PlanIter_t fn_zorba_pos_attribute_of::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new IsAttributeOfPositionIterator(sctx, loc, argv);
-}
-
-PlanIter_t fn_zorba_pos_parent_of::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new IsParentPositionIterator(sctx, loc, argv);
-}
-
-PlanIter_t fn_zorba_pos_preceding_in_document_order_of::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new IsPrecedingInDocumentOrderPositionIterator(sctx, loc, argv);
-}
-
-PlanIter_t fn_zorba_pos_following_in_document_order_of::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new IsFollowingInDocumentOrderPositionIterator(sctx, loc, argv);
-}
-
-PlanIter_t fn_zorba_pos_level::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new LevelPositionIterator(sctx, loc, argv);
-}
-
-PlanIter_t fn_zorba_pos_is_attribute::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new IsAttributePositionIterator(sctx, loc, argv);
-}
-
-PlanIter_t fn_zorba_pos_is_comment::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new IsCommentPositionIterator(sctx, loc, argv);
-}
-
-PlanIter_t fn_zorba_pos_is_document::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new IsDocumentPositionIterator(sctx, loc, argv);
-}
-
-PlanIter_t fn_zorba_pos_is_element::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new IsElementPositionIterator(sctx, loc, argv);
-}
-
-PlanIter_t fn_zorba_pos_is_processing_instruction::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new IsProcessingInstructionPositionIterator(sctx, loc, argv);
-}
-
-PlanIter_t fn_zorba_pos_is_text::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new IsTextPositionIterator(sctx, loc, argv);
-}
-
-PlanIter_t fn_zorba_pos_sibling_of::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new IsSiblingPositionIterator(sctx, loc, argv);
-}
-
-PlanIter_t fn_zorba_pos_in_same_tree_of::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new InSameTreePositionIterator(sctx, loc, argv);
-}
-
-PlanIter_t fn_zorba_pos_in_collection::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new InCollectionPositionIterator(sctx, loc, argv);
-}
-
-PlanIter_t fn_zorba_pos_in_same_collection_of::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new InSameCollectionPositionIterator(sctx, loc, argv);
-}
-
-void populate_context_node_position(static_context* sctx)
-{
-  {
-    
-
-    DECL_WITH_KIND(sctx, fn_zorba_pos_node_position,
-        (createQName("http://www.zorba-xquery.com/modules/node-position","","node-position";), 
-        GENV_TYPESYSTEM.ANY_NODE_TYPE_ONE, 
-        GENV_TYPESYSTEM.ANY_URI_TYPE_ONE),
-        FunctionConsts::FN_ZORBA_POS_NODE_POSITION_1);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, fn_zorba_pos_ancestor_of,
-        (createQName("http://www.zorba-xquery.com/modules/node-position","","ancestor-of";), 
-        GENV_TYPESYSTEM.ANY_URI_TYPE_ONE, 
-        GENV_TYPESYSTEM.ANY_URI_TYPE_ONE, 
-        GENV_TYPESYSTEM.BOOLEAN_TYPE_ONE),
-        FunctionConsts::FN_ZORBA_POS_ANCESTOR_OF_2);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, fn_zorba_pos_following_sibling_of,
-        (createQName("http://www.zorba-xquery.com/modules/node-position","","following-sibling-of";), 
-        GENV_TYPESYSTEM.ANY_URI_TYPE_ONE, 
-        GENV_TYPESYSTEM.ANY_URI_TYPE_ONE, 
-        GENV_TYPESYSTEM.BOOLEAN_TYPE_ONE),
-        FunctionConsts::FN_ZORBA_POS_FOLLOWING_SIBLING_OF_2);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, fn_zorba_pos_following_of,
-        (createQName("http://www.zorba-xquery.com/modules/node-position","","following-of";), 
-        GENV_TYPESYSTEM.ANY_URI_TYPE_ONE, 
-        GENV_TYPESYSTEM.ANY_URI_TYPE_ONE, 
-        GENV_TYPESYSTEM.BOOLEAN_TYPE_ONE),
-        FunctionConsts::FN_ZORBA_POS_FOLLOWING_OF_2);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, fn_zorba_pos_in_subtree_of,
-        (createQName("http://www.zorba-xquery.com/modules/node-position","","in-subtree-of";), 
-        GENV_TYPESYSTEM.ANY_URI_TYPE_ONE, 
-        GENV_TYPESYSTEM.ANY_URI_TYPE_ONE, 
-        GENV_TYPESYSTEM.BOOLEAN_TYPE_ONE),
-        FunctionConsts::FN_ZORBA_POS_IN_SUBTREE_OF_2);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, fn_zorba_pos_descendant_of,
-        (createQName("http://www.zorba-xquery.com/modules/node-position","","descendant-of";), 
-        GENV_TYPESYSTEM.ANY_URI_TYPE_ONE, 
-        GENV_TYPESYSTEM.ANY_URI_TYPE_ONE, 
-        GENV_TYPESYSTEM.BOOLEAN_TYPE_ONE),
-        FunctionConsts::FN_ZORBA_POS_DESCENDANT_OF_2);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, fn_zorba_pos_preceding_sibling_of,
-        (createQName("http://www.zorba-xquery.com/modules/node-position","","preceding-sibling-of";), 
-        GENV_TYPESYSTEM.ANY_URI_TYPE_ONE, 
-        GENV_TYPESYSTEM.ANY_URI_TYPE_ONE, 
-        GENV_TYPESYSTEM.BOOLEAN_TYPE_ONE),
-        FunctionConsts::FN_ZORBA_POS_PRECEDING_SIBLING_OF_2);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, fn_zorba_pos_preceding_of,
-        (createQName("http://www.zorba-xquery.com/modules/node-position","","preceding-of";), 
-        GENV_TYPESYSTEM.ANY_URI_TYPE_ONE, 
-        GENV_TYPESYSTEM.ANY_URI_TYPE_ONE, 
-        GENV_TYPESYSTEM.BOOLEAN_TYPE_ONE),
-        FunctionConsts::FN_ZORBA_POS_PRECEDING_OF_2);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, fn_zorba_pos_child_of,
-        (createQName("http://www.zorba-xquery.com/modules/node-position","","child-of";), 
-        GENV_TYPESYSTEM.ANY_URI_TYPE_ONE, 
-        GENV_TYPESYSTEM.ANY_URI_TYPE_ONE, 
-        GENV_TYPESYSTEM.BOOLEAN_TYPE_ONE),
-        FunctionConsts::FN_ZORBA_POS_CHILD_OF_2);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, fn_zorba_pos_attribute_of,
-        (createQName("http://www.zorba-xquery.com/modules/node-position","","attribute-of";), 
-        GENV_TYPESYSTEM.ANY_URI_TYPE_ONE, 
-        GENV_TYPESYSTEM.ANY_URI_TYPE_ONE, 
-        GENV_TYPESYSTEM.BOOLEAN_TYPE_ONE),
-        FunctionConsts::FN_ZORBA_POS_ATTRIBUTE_OF_2);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, fn_zorba_pos_parent_of,
-        (createQName("http://www.zorba-xquery.com/modules/node-position","","parent-of";), 
-        GENV_TYPESYSTEM.ANY_URI_TYPE_ONE, 
-        GENV_TYPESYSTEM.ANY_URI_TYPE_ONE, 
-        GENV_TYPESYSTEM.BOOLEAN_TYPE_ONE),
-        FunctionConsts::FN_ZORBA_POS_PARENT_OF_2);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, fn_zorba_pos_preceding_in_document_order_of,
-        (createQName("http://www.zorba-xquery.com/modules/node-position","","preceding-in-document-order-of";), 
-        GENV_TYPESYSTEM.ANY_URI_TYPE_ONE, 
-        GENV_TYPESYSTEM.ANY_URI_TYPE_ONE, 
-        GENV_TYPESYSTEM.BOOLEAN_TYPE_ONE),
-        FunctionConsts::FN_ZORBA_POS_PRECEDING_IN_DOCUMENT_ORDER_OF_2);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, fn_zorba_pos_following_in_document_order_of,
-        (createQName("http://www.zorba-xquery.com/modules/node-position","","following-in-document-order-of";), 
-        GENV_TYPESYSTEM.ANY_URI_TYPE_ONE, 
-        GENV_TYPESYSTEM.ANY_URI_TYPE_ONE, 
-        GENV_TYPESYSTEM.BOOLEAN_TYPE_ONE),
-        FunctionConsts::FN_ZORBA_POS_FOLLOWING_IN_DOCUMENT_ORDER_OF_2);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, fn_zorba_pos_level,
-        (createQName("http://www.zorba-xquery.com/modules/node-position","","level";), 
-        GENV_TYPESYSTEM.ANY_URI_TYPE_ONE, 
-        GENV_TYPESYSTEM.INTEGER_TYPE_ONE),
-        FunctionConsts::FN_ZORBA_POS_LEVEL_1);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, fn_zorba_pos_is_attribute,
-        (createQName("http://www.zorba-xquery.com/modules/node-position","","is-attribute";), 
-        GENV_TYPESYSTEM.ANY_URI_TYPE_ONE, 
-        GENV_TYPESYSTEM.BOOLEAN_TYPE_ONE),
-        FunctionConsts::FN_ZORBA_POS_IS_ATTRIBUTE_1);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, fn_zorba_pos_is_comment,
-        (createQName("http://www.zorba-xquery.com/modules/node-position","","is-comment";), 
-        GENV_TYPESYSTEM.ANY_URI_TYPE_ONE, 
-        GENV_TYPESYSTEM.BOOLEAN_TYPE_ONE),
-        FunctionConsts::FN_ZORBA_POS_IS_COMMENT_1);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, fn_zorba_pos_is_document,
-        (createQName("http://www.zorba-xquery.com/modules/node-position","","is-document";), 
-        GENV_TYPESYSTEM.ANY_URI_TYPE_ONE, 
-        GENV_TYPESYSTEM.BOOLEAN_TYPE_ONE),
-        FunctionConsts::FN_ZORBA_POS_IS_DOCUMENT_1);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, fn_zorba_pos_is_element,
-        (createQName("http://www.zorba-xquery.com/modules/node-position","","is-element";), 
-        GENV_TYPESYSTEM.ANY_URI_TYPE_ONE, 
-        GENV_TYPESYSTEM.BOOLEAN_TYPE_ONE),
-        FunctionConsts::FN_ZORBA_POS_IS_ELEMENT_1);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, fn_zorba_pos_is_processing_instruction,
-        (createQName("http://www.zorba-xquery.com/modules/node-position","","is-processing-instruction";), 
-        GENV_TYPESYSTEM.ANY_URI_TYPE_ONE, 
-        GENV_TYPESYSTEM.BOOLEAN_TYPE_ONE),
-        FunctionConsts::FN_ZORBA_POS_IS_PROCESSING_INSTRUCTION_1);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, fn_zorba_pos_is_text,
-        (createQName("http://www.zorba-xquery.com/modules/node-position","","is-text";), 
-        GENV_TYPESYSTEM.ANY_URI_TYPE_ONE, 
-        GENV_TYPESYSTEM.BOOLEAN_TYPE_ONE),
-        FunctionConsts::FN_ZORBA_POS_IS_TEXT_1);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, fn_zorba_pos_sibling_of,
-        (createQName("http://www.zorba-xquery.com/modules/node-position","","sibling-of";), 
-        GENV_TYPESYSTEM.ANY_URI_TYPE_ONE, 
-        GENV_TYPESYSTEM.ANY_URI_TYPE_ONE, 
-        GENV_TYPESYSTEM.BOOLEAN_TYPE_ONE),
-        FunctionConsts::FN_ZORBA_POS_SIBLING_OF_2);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, fn_zorba_pos_in_same_tree_of,
-        (createQName("http://www.zorba-xquery.com/modules/node-position","","in-same-tree-of";), 
-        GENV_TYPESYSTEM.ANY_URI_TYPE_ONE, 
-        GENV_TYPESYSTEM.ANY_URI_TYPE_ONE, 
-        GENV_TYPESYSTEM.BOOLEAN_TYPE_ONE),
-        FunctionConsts::FN_ZORBA_POS_IN_SAME_TREE_OF_2);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, fn_zorba_pos_in_collection,
-        (createQName("http://www.zorba-xquery.com/modules/node-position","","in-collection";), 
-        GENV_TYPESYSTEM.ANY_URI_TYPE_ONE, 
-        GENV_TYPESYSTEM.BOOLEAN_TYPE_ONE),
-        FunctionConsts::FN_ZORBA_POS_IN_COLLECTION_1);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, fn_zorba_pos_in_same_collection_of,
-        (createQName("http://www.zorba-xquery.com/modules/node-position","","in-same-collection-of";), 
-        GENV_TYPESYSTEM.ANY_URI_TYPE_ONE, 
-        GENV_TYPESYSTEM.ANY_URI_TYPE_ONE, 
-        GENV_TYPESYSTEM.BOOLEAN_TYPE_ONE),
-        FunctionConsts::FN_ZORBA_POS_IN_SAME_COLLECTION_OF_2);
-
-  }
-
-}
-
-
-}
-
-
-
+/*
+ * Copyright 2006-2008 The FLWOR Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+ 
+// ******************************************
+// *                                        *
+// * THIS IS A GENERATED FILE. DO NOT EDIT! *
+// * SEE .xml FILE WITH SAME NAME           *
+// *                                        *
+// ******************************************
+
+
+#include "stdafx.h"
+#include "runtime/nodes/node_position.h"
+#include "functions/func_node_position.h"
+
+
+namespace zorba{
+
+
+
+PlanIter_t fn_zorba_pos_node_position::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new NodePositionIterator(sctx, loc, argv);
+}
+
+PlanIter_t fn_zorba_pos_ancestor_of::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new IsAncestorPositionIterator(sctx, loc, argv);
+}
+
+PlanIter_t fn_zorba_pos_following_sibling_of::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new IsFollowingSiblingPositionIterator(sctx, loc, argv);
+}
+
+PlanIter_t fn_zorba_pos_following_of::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new IsFollowingPositionIterator(sctx, loc, argv);
+}
+
+PlanIter_t fn_zorba_pos_in_subtree_of::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new IsInSubtreeOfPositionIterator(sctx, loc, argv);
+}
+
+PlanIter_t fn_zorba_pos_descendant_of::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new IsDescendantPositionIterator(sctx, loc, argv);
+}
+
+PlanIter_t fn_zorba_pos_preceding_sibling_of::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new IsPrecedingSiblingPositionIterator(sctx, loc, argv);
+}
+
+PlanIter_t fn_zorba_pos_preceding_of::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new IsPrecedingPositionIterator(sctx, loc, argv);
+}
+
+PlanIter_t fn_zorba_pos_child_of::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new IsChildPositionIterator(sctx, loc, argv);
+}
+
+PlanIter_t fn_zorba_pos_attribute_of::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new IsAttributeOfPositionIterator(sctx, loc, argv);
+}
+
+PlanIter_t fn_zorba_pos_parent_of::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new IsParentPositionIterator(sctx, loc, argv);
+}
+
+PlanIter_t fn_zorba_pos_preceding_in_document_order_of::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new IsPrecedingInDocumentOrderPositionIterator(sctx, loc, argv);
+}
+
+PlanIter_t fn_zorba_pos_following_in_document_order_of::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new IsFollowingInDocumentOrderPositionIterator(sctx, loc, argv);
+}
+
+PlanIter_t fn_zorba_pos_level::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new LevelPositionIterator(sctx, loc, argv);
+}
+
+PlanIter_t fn_zorba_pos_is_attribute::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new IsAttributePositionIterator(sctx, loc, argv);
+}
+
+PlanIter_t fn_zorba_pos_is_comment::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new IsCommentPositionIterator(sctx, loc, argv);
+}
+
+PlanIter_t fn_zorba_pos_is_document::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new IsDocumentPositionIterator(sctx, loc, argv);
+}
+
+PlanIter_t fn_zorba_pos_is_element::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new IsElementPositionIterator(sctx, loc, argv);
+}
+
+PlanIter_t fn_zorba_pos_is_processing_instruction::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new IsProcessingInstructionPositionIterator(sctx, loc, argv);
+}
+
+PlanIter_t fn_zorba_pos_is_text::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new IsTextPositionIterator(sctx, loc, argv);
+}
+
+PlanIter_t fn_zorba_pos_sibling_of::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new IsSiblingPositionIterator(sctx, loc, argv);
+}
+
+PlanIter_t fn_zorba_pos_in_same_tree_of::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new InSameTreePositionIterator(sctx, loc, argv);
+}
+
+PlanIter_t fn_zorba_pos_in_collection::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new InCollectionPositionIterator(sctx, loc, argv);
+}
+
+PlanIter_t fn_zorba_pos_in_same_collection_of::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new InSameCollectionPositionIterator(sctx, loc, argv);
+}
+
+void populate_context_node_position(static_context* sctx)
+{
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_zorba_pos_node_position,
+        (createQName("http://www.zorba-xquery.com/modules/node-position","","node-position";), 
+        GENV_TYPESYSTEM.ANY_NODE_TYPE_ONE, 
+        GENV_TYPESYSTEM.ANY_URI_TYPE_ONE),
+        FunctionConsts::FN_ZORBA_POS_NODE_POSITION_1);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_zorba_pos_ancestor_of,
+        (createQName("http://www.zorba-xquery.com/modules/node-position","","ancestor-of";), 
+        GENV_TYPESYSTEM.ANY_URI_TYPE_ONE, 
+        GENV_TYPESYSTEM.ANY_URI_TYPE_ONE, 
+        GENV_TYPESYSTEM.BOOLEAN_TYPE_ONE),
+        FunctionConsts::FN_ZORBA_POS_ANCESTOR_OF_2);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_zorba_pos_following_sibling_of,
+        (createQName("http://www.zorba-xquery.com/modules/node-position","","following-sibling-of";), 
+        GENV_TYPESYSTEM.ANY_URI_TYPE_ONE, 
+        GENV_TYPESYSTEM.ANY_URI_TYPE_ONE, 
+        GENV_TYPESYSTEM.BOOLEAN_TYPE_ONE),
+        FunctionConsts::FN_ZORBA_POS_FOLLOWING_SIBLING_OF_2);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_zorba_pos_following_of,
+        (createQName("http://www.zorba-xquery.com/modules/node-position","","following-of";), 
+        GENV_TYPESYSTEM.ANY_URI_TYPE_ONE, 
+        GENV_TYPESYSTEM.ANY_URI_TYPE_ONE, 
+        GENV_TYPESYSTEM.BOOLEAN_TYPE_ONE),
+        FunctionConsts::FN_ZORBA_POS_FOLLOWING_OF_2);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_zorba_pos_in_subtree_of,
+        (createQName("http://www.zorba-xquery.com/modules/node-position","","in-subtree-of";), 
+        GENV_TYPESYSTEM.ANY_URI_TYPE_ONE, 
+        GENV_TYPESYSTEM.ANY_URI_TYPE_ONE, 
+        GENV_TYPESYSTEM.BOOLEAN_TYPE_ONE),
+        FunctionConsts::FN_ZORBA_POS_IN_SUBTREE_OF_2);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_zorba_pos_descendant_of,
+        (createQName("http://www.zorba-xquery.com/modules/node-position","","descendant-of";), 
+        GENV_TYPESYSTEM.ANY_URI_TYPE_ONE, 
+        GENV_TYPESYSTEM.ANY_URI_TYPE_ONE, 
+        GENV_TYPESYSTEM.BOOLEAN_TYPE_ONE),
+        FunctionConsts::FN_ZORBA_POS_DESCENDANT_OF_2);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_zorba_pos_preceding_sibling_of,
+        (createQName("http://www.zorba-xquery.com/modules/node-position","","preceding-sibling-of";), 
+        GENV_TYPESYSTEM.ANY_URI_TYPE_ONE, 
+        GENV_TYPESYSTEM.ANY_URI_TYPE_ONE, 
+        GENV_TYPESYSTEM.BOOLEAN_TYPE_ONE),
+        FunctionConsts::FN_ZORBA_POS_PRECEDING_SIBLING_OF_2);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_zorba_pos_preceding_of,
+        (createQName("http://www.zorba-xquery.com/modules/node-position","","preceding-of";), 
+        GENV_TYPESYSTEM.ANY_URI_TYPE_ONE, 
+        GENV_TYPESYSTEM.ANY_URI_TYPE_ONE, 
+        GENV_TYPESYSTEM.BOOLEAN_TYPE_ONE),
+        FunctionConsts::FN_ZORBA_POS_PRECEDING_OF_2);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_zorba_pos_child_of,
+        (createQName("http://www.zorba-xquery.com/modules/node-position","","child-of";), 
+        GENV_TYPESYSTEM.ANY_URI_TYPE_ONE, 
+        GENV_TYPESYSTEM.ANY_URI_TYPE_ONE, 
+        GENV_TYPESYSTEM.BOOLEAN_TYPE_ONE),
+        FunctionConsts::FN_ZORBA_POS_CHILD_OF_2);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_zorba_pos_attribute_of,
+        (createQName("http://www.zorba-xquery.com/modules/node-position","","attribute-of";), 
+        GENV_TYPESYSTEM.ANY_URI_TYPE_ONE, 
+        GENV_TYPESYSTEM.ANY_URI_TYPE_ONE, 
+        GENV_TYPESYSTEM.BOOLEAN_TYPE_ONE),
+        FunctionConsts::FN_ZORBA_POS_ATTRIBUTE_OF_2);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_zorba_pos_parent_of,
+        (createQName("http://www.zorba-xquery.com/modules/node-position","","parent-of";), 
+        GENV_TYPESYSTEM.ANY_URI_TYPE_ONE, 
+        GENV_TYPESYSTEM.ANY_URI_TYPE_ONE, 
+        GENV_TYPESYSTEM.BOOLEAN_TYPE_ONE),
+        FunctionConsts::FN_ZORBA_POS_PARENT_OF_2);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_zorba_pos_preceding_in_document_order_of,
+        (createQName("http://www.zorba-xquery.com/modules/node-position","","preceding-in-document-order-of";), 
+        GENV_TYPESYSTEM.ANY_URI_TYPE_ONE, 
+        GENV_TYPESYSTEM.ANY_URI_TYPE_ONE, 
+        GENV_TYPESYSTEM.BOOLEAN_TYPE_ONE),
+        FunctionConsts::FN_ZORBA_POS_PRECEDING_IN_DOCUMENT_ORDER_OF_2);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_zorba_pos_following_in_document_order_of,
+        (createQName("http://www.zorba-xquery.com/modules/node-position","","following-in-document-order-of";), 
+        GENV_TYPESYSTEM.ANY_URI_TYPE_ONE, 
+        GENV_TYPESYSTEM.ANY_URI_TYPE_ONE, 
+        GENV_TYPESYSTEM.BOOLEAN_TYPE_ONE),
+        FunctionConsts::FN_ZORBA_POS_FOLLOWING_IN_DOCUMENT_ORDER_OF_2);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_zorba_pos_level,
+        (createQName("http://www.zorba-xquery.com/modules/node-position","","level";), 
+        GENV_TYPESYSTEM.ANY_URI_TYPE_ONE, 
+        GENV_TYPESYSTEM.INTEGER_TYPE_ONE),
+        FunctionConsts::FN_ZORBA_POS_LEVEL_1);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_zorba_pos_is_attribute,
+        (createQName("http://www.zorba-xquery.com/modules/node-position","","is-attribute";), 
+        GENV_TYPESYSTEM.ANY_URI_TYPE_ONE, 
+        GENV_TYPESYSTEM.BOOLEAN_TYPE_ONE),
+        FunctionConsts::FN_ZORBA_POS_IS_ATTRIBUTE_1);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_zorba_pos_is_comment,
+        (createQName("http://www.zorba-xquery.com/modules/node-position","","is-comment";), 
+        GENV_TYPESYSTEM.ANY_URI_TYPE_ONE, 
+        GENV_TYPESYSTEM.BOOLEAN_TYPE_ONE),
+        FunctionConsts::FN_ZORBA_POS_IS_COMMENT_1);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_zorba_pos_is_document,
+        (createQName("http://www.zorba-xquery.com/modules/node-position","","is-document";), 
+        GENV_TYPESYSTEM.ANY_URI_TYPE_ONE, 
+        GENV_TYPESYSTEM.BOOLEAN_TYPE_ONE),
+        FunctionConsts::FN_ZORBA_POS_IS_DOCUMENT_1);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_zorba_pos_is_element,
+        (createQName("http://www.zorba-xquery.com/modules/node-position","","is-element";), 
+        GENV_TYPESYSTEM.ANY_URI_TYPE_ONE, 
+        GENV_TYPESYSTEM.BOOLEAN_TYPE_ONE),
+        FunctionConsts::FN_ZORBA_POS_IS_ELEMENT_1);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_zorba_pos_is_processing_instruction,
+        (createQName("http://www.zorba-xquery.com/modules/node-position","","is-processing-instruction";), 
+        GENV_TYPESYSTEM.ANY_URI_TYPE_ONE, 
+        GENV_TYPESYSTEM.BOOLEAN_TYPE_ONE),
+        FunctionConsts::FN_ZORBA_POS_IS_PROCESSING_INSTRUCTION_1);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_zorba_pos_is_text,
+        (createQName("http://www.zorba-xquery.com/modules/node-position","","is-text";), 
+        GENV_TYPESYSTEM.ANY_URI_TYPE_ONE, 
+        GENV_TYPESYSTEM.BOOLEAN_TYPE_ONE),
+        FunctionConsts::FN_ZORBA_POS_IS_TEXT_1);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_zorba_pos_sibling_of,
+        (createQName("http://www.zorba-xquery.com/modules/node-position","","sibling-of";), 
+        GENV_TYPESYSTEM.ANY_URI_TYPE_ONE, 
+        GENV_TYPESYSTEM.ANY_URI_TYPE_ONE, 
+        GENV_TYPESYSTEM.BOOLEAN_TYPE_ONE),
+        FunctionConsts::FN_ZORBA_POS_SIBLING_OF_2);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_zorba_pos_in_same_tree_of,
+        (createQName("http://www.zorba-xquery.com/modules/node-position","","in-same-tree-of";), 
+        GENV_TYPESYSTEM.ANY_URI_TYPE_ONE, 
+        GENV_TYPESYSTEM.ANY_URI_TYPE_ONE, 
+        GENV_TYPESYSTEM.BOOLEAN_TYPE_ONE),
+        FunctionConsts::FN_ZORBA_POS_IN_SAME_TREE_OF_2);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_zorba_pos_in_collection,
+        (createQName("http://www.zorba-xquery.com/modules/node-position","","in-collection";), 
+        GENV_TYPESYSTEM.ANY_URI_TYPE_ONE, 
+        GENV_TYPESYSTEM.BOOLEAN_TYPE_ONE),
+        FunctionConsts::FN_ZORBA_POS_IN_COLLECTION_1);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_zorba_pos_in_same_collection_of,
+        (createQName("http://www.zorba-xquery.com/modules/node-position","","in-same-collection-of";), 
+        GENV_TYPESYSTEM.ANY_URI_TYPE_ONE, 
+        GENV_TYPESYSTEM.ANY_URI_TYPE_ONE, 
+        GENV_TYPESYSTEM.BOOLEAN_TYPE_ONE),
+        FunctionConsts::FN_ZORBA_POS_IN_SAME_COLLECTION_OF_2);
+
+  }
+
+}
+
+
+}
+
+
+

=== modified file 'src/functions/pregenerated/func_node_position.h'
--- src/functions/pregenerated/func_node_position.h	2012-03-28 23:58:23 +0000
+++ src/functions/pregenerated/func_node_position.h	2012-04-13 09:35:12 +0000
@@ -1,409 +1,409 @@
-/*
- * Copyright 2006-2008 The FLWOR Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- 
-// ******************************************
-// *                                        *
-// * THIS IS A GENERATED FILE. DO NOT EDIT! *
-// * SEE .xml FILE WITH SAME NAME           *
-// *                                        *
-// ******************************************
-
-
-#ifndef ZORBA_FUNCTIONS_NODE_POSITION_H
-#define ZORBA_FUNCTIONS_NODE_POSITION_H
-
-
-#include "common/shared_types.h"
-#include "functions/function_impl.h"
-
-
-namespace zorba {
-
-
-void populate_context_node_position(static_context* sctx);
-
-
-
-
-//fn-zorba-pos:node-position
-class fn_zorba_pos_node_position : public function
-{
-public:
-  fn_zorba_pos_node_position(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-
-  }
-
-  CODEGEN_DECL();
-};
-
-
-//fn-zorba-pos:ancestor-of
-class fn_zorba_pos_ancestor_of : public function
-{
-public:
-  fn_zorba_pos_ancestor_of(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-
-  }
-
-  CODEGEN_DECL();
-};
-
-
-//fn-zorba-pos:following-sibling-of
-class fn_zorba_pos_following_sibling_of : public function
-{
-public:
-  fn_zorba_pos_following_sibling_of(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-
-  }
-
-  CODEGEN_DECL();
-};
-
-
-//fn-zorba-pos:following-of
-class fn_zorba_pos_following_of : public function
-{
-public:
-  fn_zorba_pos_following_of(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-
-  }
-
-  CODEGEN_DECL();
-};
-
-
-//fn-zorba-pos:in-subtree-of
-class fn_zorba_pos_in_subtree_of : public function
-{
-public:
-  fn_zorba_pos_in_subtree_of(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-
-  }
-
-  CODEGEN_DECL();
-};
-
-
-//fn-zorba-pos:descendant-of
-class fn_zorba_pos_descendant_of : public function
-{
-public:
-  fn_zorba_pos_descendant_of(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-
-  }
-
-  CODEGEN_DECL();
-};
-
-
-//fn-zorba-pos:preceding-sibling-of
-class fn_zorba_pos_preceding_sibling_of : public function
-{
-public:
-  fn_zorba_pos_preceding_sibling_of(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-
-  }
-
-  CODEGEN_DECL();
-};
-
-
-//fn-zorba-pos:preceding-of
-class fn_zorba_pos_preceding_of : public function
-{
-public:
-  fn_zorba_pos_preceding_of(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-
-  }
-
-  CODEGEN_DECL();
-};
-
-
-//fn-zorba-pos:child-of
-class fn_zorba_pos_child_of : public function
-{
-public:
-  fn_zorba_pos_child_of(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-
-  }
-
-  CODEGEN_DECL();
-};
-
-
-//fn-zorba-pos:attribute-of
-class fn_zorba_pos_attribute_of : public function
-{
-public:
-  fn_zorba_pos_attribute_of(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-
-  }
-
-  CODEGEN_DECL();
-};
-
-
-//fn-zorba-pos:parent-of
-class fn_zorba_pos_parent_of : public function
-{
-public:
-  fn_zorba_pos_parent_of(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-
-  }
-
-  CODEGEN_DECL();
-};
-
-
-//fn-zorba-pos:preceding-in-document-order-of
-class fn_zorba_pos_preceding_in_document_order_of : public function
-{
-public:
-  fn_zorba_pos_preceding_in_document_order_of(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-
-  }
-
-  CODEGEN_DECL();
-};
-
-
-//fn-zorba-pos:following-in-document-order-of
-class fn_zorba_pos_following_in_document_order_of : public function
-{
-public:
-  fn_zorba_pos_following_in_document_order_of(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-
-  }
-
-  CODEGEN_DECL();
-};
-
-
-//fn-zorba-pos:level
-class fn_zorba_pos_level : public function
-{
-public:
-  fn_zorba_pos_level(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-
-  }
-
-  CODEGEN_DECL();
-};
-
-
-//fn-zorba-pos:is-attribute
-class fn_zorba_pos_is_attribute : public function
-{
-public:
-  fn_zorba_pos_is_attribute(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-
-  }
-
-  CODEGEN_DECL();
-};
-
-
-//fn-zorba-pos:is-comment
-class fn_zorba_pos_is_comment : public function
-{
-public:
-  fn_zorba_pos_is_comment(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-
-  }
-
-  CODEGEN_DECL();
-};
-
-
-//fn-zorba-pos:is-document
-class fn_zorba_pos_is_document : public function
-{
-public:
-  fn_zorba_pos_is_document(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-
-  }
-
-  CODEGEN_DECL();
-};
-
-
-//fn-zorba-pos:is-element
-class fn_zorba_pos_is_element : public function
-{
-public:
-  fn_zorba_pos_is_element(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-
-  }
-
-  CODEGEN_DECL();
-};
-
-
-//fn-zorba-pos:is-processing-instruction
-class fn_zorba_pos_is_processing_instruction : public function
-{
-public:
-  fn_zorba_pos_is_processing_instruction(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-
-  }
-
-  CODEGEN_DECL();
-};
-
-
-//fn-zorba-pos:is-text
-class fn_zorba_pos_is_text : public function
-{
-public:
-  fn_zorba_pos_is_text(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-
-  }
-
-  CODEGEN_DECL();
-};
-
-
-//fn-zorba-pos:sibling-of
-class fn_zorba_pos_sibling_of : public function
-{
-public:
-  fn_zorba_pos_sibling_of(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-
-  }
-
-  CODEGEN_DECL();
-};
-
-
-//fn-zorba-pos:in-same-tree-of
-class fn_zorba_pos_in_same_tree_of : public function
-{
-public:
-  fn_zorba_pos_in_same_tree_of(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-
-  }
-
-  CODEGEN_DECL();
-};
-
-
-//fn-zorba-pos:in-collection
-class fn_zorba_pos_in_collection : public function
-{
-public:
-  fn_zorba_pos_in_collection(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-
-  }
-
-  CODEGEN_DECL();
-};
-
-
-//fn-zorba-pos:in-same-collection-of
-class fn_zorba_pos_in_same_collection_of : public function
-{
-public:
-  fn_zorba_pos_in_same_collection_of(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-
-  }
-
-  CODEGEN_DECL();
-};
-
-
-} //namespace zorba
-
-
-#endif
-/*
- * Local variables:
- * mode: c++
- * End:
- */ 
+/*
+ * Copyright 2006-2008 The FLWOR Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+ 
+// ******************************************
+// *                                        *
+// * THIS IS A GENERATED FILE. DO NOT EDIT! *
+// * SEE .xml FILE WITH SAME NAME           *
+// *                                        *
+// ******************************************
+
+
+#ifndef ZORBA_FUNCTIONS_NODE_POSITION_H
+#define ZORBA_FUNCTIONS_NODE_POSITION_H
+
+
+#include "common/shared_types.h"
+#include "functions/function_impl.h"
+
+
+namespace zorba {
+
+
+void populate_context_node_position(static_context* sctx);
+
+
+
+
+//fn-zorba-pos:node-position
+class fn_zorba_pos_node_position : public function
+{
+public:
+  fn_zorba_pos_node_position(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  CODEGEN_DECL();
+};
+
+
+//fn-zorba-pos:ancestor-of
+class fn_zorba_pos_ancestor_of : public function
+{
+public:
+  fn_zorba_pos_ancestor_of(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  CODEGEN_DECL();
+};
+
+
+//fn-zorba-pos:following-sibling-of
+class fn_zorba_pos_following_sibling_of : public function
+{
+public:
+  fn_zorba_pos_following_sibling_of(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  CODEGEN_DECL();
+};
+
+
+//fn-zorba-pos:following-of
+class fn_zorba_pos_following_of : public function
+{
+public:
+  fn_zorba_pos_following_of(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  CODEGEN_DECL();
+};
+
+
+//fn-zorba-pos:in-subtree-of
+class fn_zorba_pos_in_subtree_of : public function
+{
+public:
+  fn_zorba_pos_in_subtree_of(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  CODEGEN_DECL();
+};
+
+
+//fn-zorba-pos:descendant-of
+class fn_zorba_pos_descendant_of : public function
+{
+public:
+  fn_zorba_pos_descendant_of(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  CODEGEN_DECL();
+};
+
+
+//fn-zorba-pos:preceding-sibling-of
+class fn_zorba_pos_preceding_sibling_of : public function
+{
+public:
+  fn_zorba_pos_preceding_sibling_of(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  CODEGEN_DECL();
+};
+
+
+//fn-zorba-pos:preceding-of
+class fn_zorba_pos_preceding_of : public function
+{
+public:
+  fn_zorba_pos_preceding_of(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  CODEGEN_DECL();
+};
+
+
+//fn-zorba-pos:child-of
+class fn_zorba_pos_child_of : public function
+{
+public:
+  fn_zorba_pos_child_of(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  CODEGEN_DECL();
+};
+
+
+//fn-zorba-pos:attribute-of
+class fn_zorba_pos_attribute_of : public function
+{
+public:
+  fn_zorba_pos_attribute_of(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  CODEGEN_DECL();
+};
+
+
+//fn-zorba-pos:parent-of
+class fn_zorba_pos_parent_of : public function
+{
+public:
+  fn_zorba_pos_parent_of(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  CODEGEN_DECL();
+};
+
+
+//fn-zorba-pos:preceding-in-document-order-of
+class fn_zorba_pos_preceding_in_document_order_of : public function
+{
+public:
+  fn_zorba_pos_preceding_in_document_order_of(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  CODEGEN_DECL();
+};
+
+
+//fn-zorba-pos:following-in-document-order-of
+class fn_zorba_pos_following_in_document_order_of : public function
+{
+public:
+  fn_zorba_pos_following_in_document_order_of(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  CODEGEN_DECL();
+};
+
+
+//fn-zorba-pos:level
+class fn_zorba_pos_level : public function
+{
+public:
+  fn_zorba_pos_level(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  CODEGEN_DECL();
+};
+
+
+//fn-zorba-pos:is-attribute
+class fn_zorba_pos_is_attribute : public function
+{
+public:
+  fn_zorba_pos_is_attribute(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  CODEGEN_DECL();
+};
+
+
+//fn-zorba-pos:is-comment
+class fn_zorba_pos_is_comment : public function
+{
+public:
+  fn_zorba_pos_is_comment(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  CODEGEN_DECL();
+};
+
+
+//fn-zorba-pos:is-document
+class fn_zorba_pos_is_document : public function
+{
+public:
+  fn_zorba_pos_is_document(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  CODEGEN_DECL();
+};
+
+
+//fn-zorba-pos:is-element
+class fn_zorba_pos_is_element : public function
+{
+public:
+  fn_zorba_pos_is_element(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  CODEGEN_DECL();
+};
+
+
+//fn-zorba-pos:is-processing-instruction
+class fn_zorba_pos_is_processing_instruction : public function
+{
+public:
+  fn_zorba_pos_is_processing_instruction(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  CODEGEN_DECL();
+};
+
+
+//fn-zorba-pos:is-text
+class fn_zorba_pos_is_text : public function
+{
+public:
+  fn_zorba_pos_is_text(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  CODEGEN_DECL();
+};
+
+
+//fn-zorba-pos:sibling-of
+class fn_zorba_pos_sibling_of : public function
+{
+public:
+  fn_zorba_pos_sibling_of(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  CODEGEN_DECL();
+};
+
+
+//fn-zorba-pos:in-same-tree-of
+class fn_zorba_pos_in_same_tree_of : public function
+{
+public:
+  fn_zorba_pos_in_same_tree_of(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  CODEGEN_DECL();
+};
+
+
+//fn-zorba-pos:in-collection
+class fn_zorba_pos_in_collection : public function
+{
+public:
+  fn_zorba_pos_in_collection(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  CODEGEN_DECL();
+};
+
+
+//fn-zorba-pos:in-same-collection-of
+class fn_zorba_pos_in_same_collection_of : public function
+{
+public:
+  fn_zorba_pos_in_same_collection_of(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  CODEGEN_DECL();
+};
+
+
+} //namespace zorba
+
+
+#endif
+/*
+ * Local variables:
+ * mode: c++
+ * End:
+ */ 

=== modified file 'src/functions/pregenerated/func_nodes.cpp'
--- src/functions/pregenerated/func_nodes.cpp	2012-03-28 23:58:23 +0000
+++ src/functions/pregenerated/func_nodes.cpp	2012-04-13 09:35:12 +0000
@@ -1,547 +1,547 @@
-/*
- * Copyright 2006-2008 The FLWOR Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- 
-// ******************************************
-// *                                        *
-// * THIS IS A GENERATED FILE. DO NOT EDIT! *
-// * SEE .xml FILE WITH SAME NAME           *
-// *                                        *
-// ******************************************
-
-
-#include "stdafx.h"
-#include "runtime/nodes/nodes.h"
-#include "functions/func_nodes.h"
-
-
-namespace zorba{
-
-
-
-PlanIter_t fn_zorba_ref_node_reference::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new NodeReferenceIterator(sctx, loc, argv);
-}
-
-PlanIter_t fn_zorba_ref_node_by_reference::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new NodeByReferenceIterator(sctx, loc, argv);
-}
-
-PlanIter_t fn_local_name::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new FnLocalNameIterator(sctx, loc, argv);
-}
-
-PlanIter_t fn_namespace_uri::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new FnNamespaceUriIterator(sctx, loc, argv);
-}
-
-PlanIter_t fn_lang::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new FnLangIterator(sctx, loc, argv);
-}
-
-PlanIter_t fn_number::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return NULL;
-}
-
-PlanIter_t fn_has_children_3_0::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new FnHasChildrenIterator(sctx, loc, argv);
-}
-
-PlanIter_t fn_innermost_3_0::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new FnInnermostIterator(sctx, loc, argv);
-}
-
-PlanIter_t fn_outermost_3_0::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new FnOutermostIterator(sctx, loc, argv);
-}
-
-PlanIter_t fn_generate_id_3_0::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new FnGenerateIdIterator(sctx, loc, argv);
-}
-
-PlanIter_t fn_zorba_node_ancestor_of::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new IsAncestorIterator(sctx, loc, argv);
-}
-
-PlanIter_t fn_zorba_node_descendant_of::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new IsDescendantIterator(sctx, loc, argv);
-}
-
-PlanIter_t fn_zorba_node_parent_of::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new IsParentIterator(sctx, loc, argv);
-}
-
-PlanIter_t fn_zorba_node_child_of::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new IsChildIterator(sctx, loc, argv);
-}
-
-PlanIter_t fn_zorba_node_following_of::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new IsFollowingIterator(sctx, loc, argv);
-}
-
-PlanIter_t fn_zorba_node_preceding_of::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new IsPrecedingIterator(sctx, loc, argv);
-}
-
-PlanIter_t fn_zorba_node_following_sibling_of::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new IsFollowingSiblingIterator(sctx, loc, argv);
-}
-
-PlanIter_t fn_zorba_node_preceding_sibling_of::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new IsPrecedingSiblingIterator(sctx, loc, argv);
-}
-
-PlanIter_t fn_zorba_node_level::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new LevelIterator(sctx, loc, argv);
-}
-
-PlanIter_t fn_zorba_node_least_common_ancestor::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new LeastCommonAncestor(sctx, loc, argv);
-}
-
-void populate_context_nodes(static_context* sctx)
-{
-  {
-    
-
-    DECL_WITH_KIND(sctx, fn_zorba_ref_node_reference,
-        (createQName("http://www.zorba-xquery.com/modules/node-reference","","node-reference";), 
-        GENV_TYPESYSTEM.ANY_NODE_TYPE_ONE, 
-        GENV_TYPESYSTEM.ANY_URI_TYPE_ONE),
-        FunctionConsts::FN_ZORBA_REF_NODE_REFERENCE_1);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, fn_zorba_ref_node_by_reference,
-        (createQName("http://www.zorba-xquery.com/modules/node-reference","","node-by-reference";), 
-        GENV_TYPESYSTEM.ANY_URI_TYPE_ONE, 
-        GENV_TYPESYSTEM.ANY_NODE_TYPE_QUESTION),
-        FunctionConsts::FN_ZORBA_REF_NODE_BY_REFERENCE_1);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, fn_local_name,
-        (createQName("http://www.w3.org/2005/xpath-functions","","local-name";), 
-        GENV_TYPESYSTEM.STRING_TYPE_ONE),
-        FunctionConsts::FN_LOCAL_NAME_0);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, fn_local_name,
-        (createQName("http://www.w3.org/2005/xpath-functions","","local-name";), 
-        GENV_TYPESYSTEM.ANY_NODE_TYPE_QUESTION, 
-        GENV_TYPESYSTEM.STRING_TYPE_ONE),
-        FunctionConsts::FN_LOCAL_NAME_1);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, fn_namespace_uri,
-        (createQName("http://www.w3.org/2005/xpath-functions","","namespace-uri";), 
-        GENV_TYPESYSTEM.ANY_URI_TYPE_QUESTION),
-        FunctionConsts::FN_NAMESPACE_URI_0);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, fn_namespace_uri,
-        (createQName("http://www.w3.org/2005/xpath-functions","","namespace-uri";), 
-        GENV_TYPESYSTEM.ANY_NODE_TYPE_QUESTION, 
-        GENV_TYPESYSTEM.ANY_URI_TYPE_QUESTION),
-        FunctionConsts::FN_NAMESPACE_URI_1);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, fn_lang,
-        (createQName("http://www.w3.org/2005/xpath-functions","","lang";), 
-        GENV_TYPESYSTEM.STRING_TYPE_QUESTION, 
-        GENV_TYPESYSTEM.BOOLEAN_TYPE_ONE),
-        FunctionConsts::FN_LANG_1);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, fn_lang,
-        (createQName("http://www.w3.org/2005/xpath-functions","","lang";), 
-        GENV_TYPESYSTEM.STRING_TYPE_QUESTION, 
-        GENV_TYPESYSTEM.ANY_NODE_TYPE_ONE, 
-        GENV_TYPESYSTEM.BOOLEAN_TYPE_ONE),
-        FunctionConsts::FN_LANG_2);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, fn_number,
-        (createQName("http://www.w3.org/2005/xpath-functions","","number";), 
-        GENV_TYPESYSTEM.DOUBLE_TYPE_ONE),
-        FunctionConsts::FN_NUMBER_0);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, fn_number,
-        (createQName("http://www.w3.org/2005/xpath-functions","","number";), 
-        GENV_TYPESYSTEM.ANY_ATOMIC_TYPE_QUESTION, 
-        GENV_TYPESYSTEM.DOUBLE_TYPE_ONE),
-        FunctionConsts::FN_NUMBER_1);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, fn_has_children_3_0,
-        (createQName("http://www.w3.org/2005/xpath-functions","","has-children";), 
-        GENV_TYPESYSTEM.ANY_NODE_TYPE_QUESTION, 
-        GENV_TYPESYSTEM.BOOLEAN_TYPE_ONE),
-        FunctionConsts::FN_HAS_CHILDREN_1);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, fn_innermost_3_0,
-        (createQName("http://www.w3.org/2005/xpath-functions","","innermost";), 
-        GENV_TYPESYSTEM.ANY_NODE_TYPE_STAR, 
-        GENV_TYPESYSTEM.ANY_NODE_TYPE_STAR),
-        FunctionConsts::FN_INNERMOST_1);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, fn_outermost_3_0,
-        (createQName("http://www.w3.org/2005/xpath-functions","","outermost";), 
-        GENV_TYPESYSTEM.ANY_NODE_TYPE_STAR, 
-        GENV_TYPESYSTEM.ANY_NODE_TYPE_STAR),
-        FunctionConsts::FN_OUTERMOST_1);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, fn_generate_id_3_0,
-        (createQName("http://www.w3.org/2005/xpath-functions","","generate-id";), 
-        GENV_TYPESYSTEM.STRING_TYPE_ONE),
-        FunctionConsts::FN_GENERATE_ID_0);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, fn_generate_id_3_0,
-        (createQName("http://www.w3.org/2005/xpath-functions","","generate-id";), 
-        GENV_TYPESYSTEM.ANY_NODE_TYPE_QUESTION, 
-        GENV_TYPESYSTEM.STRING_TYPE_ONE),
-        FunctionConsts::FN_GENERATE_ID_1);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, fn_zorba_node_ancestor_of,
-        (createQName("http://www.zorba-xquery.com/modules/node","","ancestor-of";), 
-        GENV_TYPESYSTEM.ANY_NODE_TYPE_ONE, 
-        GENV_TYPESYSTEM.ANY_NODE_TYPE_ONE, 
-        GENV_TYPESYSTEM.BOOLEAN_TYPE_ONE),
-        FunctionConsts::FN_ZORBA_NODE_ANCESTOR_OF_2);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, fn_zorba_node_descendant_of,
-        (createQName("http://www.zorba-xquery.com/modules/node","","descendant-of";), 
-        GENV_TYPESYSTEM.ANY_NODE_TYPE_ONE, 
-        GENV_TYPESYSTEM.ANY_NODE_TYPE_ONE, 
-        GENV_TYPESYSTEM.BOOLEAN_TYPE_ONE),
-        FunctionConsts::FN_ZORBA_NODE_DESCENDANT_OF_2);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, fn_zorba_node_parent_of,
-        (createQName("http://www.zorba-xquery.com/modules/node","","parent-of";), 
-        GENV_TYPESYSTEM.ANY_NODE_TYPE_ONE, 
-        GENV_TYPESYSTEM.ANY_NODE_TYPE_ONE, 
-        GENV_TYPESYSTEM.BOOLEAN_TYPE_ONE),
-        FunctionConsts::FN_ZORBA_NODE_PARENT_OF_2);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, fn_zorba_node_child_of,
-        (createQName("http://www.zorba-xquery.com/modules/node","","child-of";), 
-        GENV_TYPESYSTEM.ANY_NODE_TYPE_ONE, 
-        GENV_TYPESYSTEM.ANY_NODE_TYPE_ONE, 
-        GENV_TYPESYSTEM.BOOLEAN_TYPE_ONE),
-        FunctionConsts::FN_ZORBA_NODE_CHILD_OF_2);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, fn_zorba_node_following_of,
-        (createQName("http://www.zorba-xquery.com/modules/node","","following-of";), 
-        GENV_TYPESYSTEM.ANY_NODE_TYPE_ONE, 
-        GENV_TYPESYSTEM.ANY_NODE_TYPE_ONE, 
-        GENV_TYPESYSTEM.BOOLEAN_TYPE_ONE),
-        FunctionConsts::FN_ZORBA_NODE_FOLLOWING_OF_2);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, fn_zorba_node_preceding_of,
-        (createQName("http://www.zorba-xquery.com/modules/node","","preceding-of";), 
-        GENV_TYPESYSTEM.ANY_NODE_TYPE_ONE, 
-        GENV_TYPESYSTEM.ANY_NODE_TYPE_ONE, 
-        GENV_TYPESYSTEM.BOOLEAN_TYPE_ONE),
-        FunctionConsts::FN_ZORBA_NODE_PRECEDING_OF_2);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, fn_zorba_node_following_sibling_of,
-        (createQName("http://www.zorba-xquery.com/modules/node","","following-sibling-of";), 
-        GENV_TYPESYSTEM.ANY_NODE_TYPE_ONE, 
-        GENV_TYPESYSTEM.ANY_NODE_TYPE_ONE, 
-        GENV_TYPESYSTEM.BOOLEAN_TYPE_ONE),
-        FunctionConsts::FN_ZORBA_NODE_FOLLOWING_SIBLING_OF_2);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, fn_zorba_node_preceding_sibling_of,
-        (createQName("http://www.zorba-xquery.com/modules/node","","preceding-sibling-of";), 
-        GENV_TYPESYSTEM.ANY_NODE_TYPE_ONE, 
-        GENV_TYPESYSTEM.ANY_NODE_TYPE_ONE, 
-        GENV_TYPESYSTEM.BOOLEAN_TYPE_ONE),
-        FunctionConsts::FN_ZORBA_NODE_PRECEDING_SIBLING_OF_2);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, fn_zorba_node_level,
-        (createQName("http://www.zorba-xquery.com/modules/node","","level";), 
-        GENV_TYPESYSTEM.ANY_NODE_TYPE_ONE, 
-        GENV_TYPESYSTEM.INTEGER_TYPE_ONE),
-        FunctionConsts::FN_ZORBA_NODE_LEVEL_1);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, fn_zorba_node_least_common_ancestor,
-        (createQName("http://www.zorba-xquery.com/modules/node","","least-common-ancestor";), 
-        GENV_TYPESYSTEM.ANY_NODE_TYPE_ONE, 
-        GENV_TYPESYSTEM.ANY_NODE_TYPE_ONE, 
-        GENV_TYPESYSTEM.ANY_NODE_TYPE_QUESTION),
-        FunctionConsts::FN_ZORBA_NODE_LEAST_COMMON_ANCESTOR_2);
-
-  }
-
-}
-
-
-}
-
-
-
+/*
+ * Copyright 2006-2008 The FLWOR Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+ 
+// ******************************************
+// *                                        *
+// * THIS IS A GENERATED FILE. DO NOT EDIT! *
+// * SEE .xml FILE WITH SAME NAME           *
+// *                                        *
+// ******************************************
+
+
+#include "stdafx.h"
+#include "runtime/nodes/nodes.h"
+#include "functions/func_nodes.h"
+
+
+namespace zorba{
+
+
+
+PlanIter_t fn_zorba_ref_node_reference::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new NodeReferenceIterator(sctx, loc, argv);
+}
+
+PlanIter_t fn_zorba_ref_node_by_reference::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new NodeByReferenceIterator(sctx, loc, argv);
+}
+
+PlanIter_t fn_local_name::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new FnLocalNameIterator(sctx, loc, argv);
+}
+
+PlanIter_t fn_namespace_uri::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new FnNamespaceUriIterator(sctx, loc, argv);
+}
+
+PlanIter_t fn_lang::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new FnLangIterator(sctx, loc, argv);
+}
+
+PlanIter_t fn_number::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return NULL;
+}
+
+PlanIter_t fn_has_children_3_0::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new FnHasChildrenIterator(sctx, loc, argv);
+}
+
+PlanIter_t fn_innermost_3_0::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new FnInnermostIterator(sctx, loc, argv);
+}
+
+PlanIter_t fn_outermost_3_0::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new FnOutermostIterator(sctx, loc, argv);
+}
+
+PlanIter_t fn_generate_id_3_0::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new FnGenerateIdIterator(sctx, loc, argv);
+}
+
+PlanIter_t fn_zorba_node_ancestor_of::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new IsAncestorIterator(sctx, loc, argv);
+}
+
+PlanIter_t fn_zorba_node_descendant_of::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new IsDescendantIterator(sctx, loc, argv);
+}
+
+PlanIter_t fn_zorba_node_parent_of::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new IsParentIterator(sctx, loc, argv);
+}
+
+PlanIter_t fn_zorba_node_child_of::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new IsChildIterator(sctx, loc, argv);
+}
+
+PlanIter_t fn_zorba_node_following_of::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new IsFollowingIterator(sctx, loc, argv);
+}
+
+PlanIter_t fn_zorba_node_preceding_of::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new IsPrecedingIterator(sctx, loc, argv);
+}
+
+PlanIter_t fn_zorba_node_following_sibling_of::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new IsFollowingSiblingIterator(sctx, loc, argv);
+}
+
+PlanIter_t fn_zorba_node_preceding_sibling_of::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new IsPrecedingSiblingIterator(sctx, loc, argv);
+}
+
+PlanIter_t fn_zorba_node_level::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new LevelIterator(sctx, loc, argv);
+}
+
+PlanIter_t fn_zorba_node_least_common_ancestor::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new LeastCommonAncestor(sctx, loc, argv);
+}
+
+void populate_context_nodes(static_context* sctx)
+{
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_zorba_ref_node_reference,
+        (createQName("http://www.zorba-xquery.com/modules/node-reference","","node-reference";), 
+        GENV_TYPESYSTEM.ANY_NODE_TYPE_ONE, 
+        GENV_TYPESYSTEM.ANY_URI_TYPE_ONE),
+        FunctionConsts::FN_ZORBA_REF_NODE_REFERENCE_1);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_zorba_ref_node_by_reference,
+        (createQName("http://www.zorba-xquery.com/modules/node-reference","","node-by-reference";), 
+        GENV_TYPESYSTEM.ANY_URI_TYPE_ONE, 
+        GENV_TYPESYSTEM.ANY_NODE_TYPE_QUESTION),
+        FunctionConsts::FN_ZORBA_REF_NODE_BY_REFERENCE_1);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_local_name,
+        (createQName("http://www.w3.org/2005/xpath-functions","","local-name";), 
+        GENV_TYPESYSTEM.STRING_TYPE_ONE),
+        FunctionConsts::FN_LOCAL_NAME_0);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_local_name,
+        (createQName("http://www.w3.org/2005/xpath-functions","","local-name";), 
+        GENV_TYPESYSTEM.ANY_NODE_TYPE_QUESTION, 
+        GENV_TYPESYSTEM.STRING_TYPE_ONE),
+        FunctionConsts::FN_LOCAL_NAME_1);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_namespace_uri,
+        (createQName("http://www.w3.org/2005/xpath-functions","","namespace-uri";), 
+        GENV_TYPESYSTEM.ANY_URI_TYPE_QUESTION),
+        FunctionConsts::FN_NAMESPACE_URI_0);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_namespace_uri,
+        (createQName("http://www.w3.org/2005/xpath-functions","","namespace-uri";), 
+        GENV_TYPESYSTEM.ANY_NODE_TYPE_QUESTION, 
+        GENV_TYPESYSTEM.ANY_URI_TYPE_QUESTION),
+        FunctionConsts::FN_NAMESPACE_URI_1);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_lang,
+        (createQName("http://www.w3.org/2005/xpath-functions","","lang";), 
+        GENV_TYPESYSTEM.STRING_TYPE_QUESTION, 
+        GENV_TYPESYSTEM.BOOLEAN_TYPE_ONE),
+        FunctionConsts::FN_LANG_1);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_lang,
+        (createQName("http://www.w3.org/2005/xpath-functions","","lang";), 
+        GENV_TYPESYSTEM.STRING_TYPE_QUESTION, 
+        GENV_TYPESYSTEM.ANY_NODE_TYPE_ONE, 
+        GENV_TYPESYSTEM.BOOLEAN_TYPE_ONE),
+        FunctionConsts::FN_LANG_2);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_number,
+        (createQName("http://www.w3.org/2005/xpath-functions","","number";), 
+        GENV_TYPESYSTEM.DOUBLE_TYPE_ONE),
+        FunctionConsts::FN_NUMBER_0);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_number,
+        (createQName("http://www.w3.org/2005/xpath-functions","","number";), 
+        GENV_TYPESYSTEM.ANY_ATOMIC_TYPE_QUESTION, 
+        GENV_TYPESYSTEM.DOUBLE_TYPE_ONE),
+        FunctionConsts::FN_NUMBER_1);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_has_children_3_0,
+        (createQName("http://www.w3.org/2005/xpath-functions","","has-children";), 
+        GENV_TYPESYSTEM.ANY_NODE_TYPE_QUESTION, 
+        GENV_TYPESYSTEM.BOOLEAN_TYPE_ONE),
+        FunctionConsts::FN_HAS_CHILDREN_1);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_innermost_3_0,
+        (createQName("http://www.w3.org/2005/xpath-functions","","innermost";), 
+        GENV_TYPESYSTEM.ANY_NODE_TYPE_STAR, 
+        GENV_TYPESYSTEM.ANY_NODE_TYPE_STAR),
+        FunctionConsts::FN_INNERMOST_1);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_outermost_3_0,
+        (createQName("http://www.w3.org/2005/xpath-functions","","outermost";), 
+        GENV_TYPESYSTEM.ANY_NODE_TYPE_STAR, 
+        GENV_TYPESYSTEM.ANY_NODE_TYPE_STAR),
+        FunctionConsts::FN_OUTERMOST_1);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_generate_id_3_0,
+        (createQName("http://www.w3.org/2005/xpath-functions","","generate-id";), 
+        GENV_TYPESYSTEM.STRING_TYPE_ONE),
+        FunctionConsts::FN_GENERATE_ID_0);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_generate_id_3_0,
+        (createQName("http://www.w3.org/2005/xpath-functions","","generate-id";), 
+        GENV_TYPESYSTEM.ANY_NODE_TYPE_QUESTION, 
+        GENV_TYPESYSTEM.STRING_TYPE_ONE),
+        FunctionConsts::FN_GENERATE_ID_1);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_zorba_node_ancestor_of,
+        (createQName("http://www.zorba-xquery.com/modules/node","","ancestor-of";), 
+        GENV_TYPESYSTEM.ANY_NODE_TYPE_ONE, 
+        GENV_TYPESYSTEM.ANY_NODE_TYPE_ONE, 
+        GENV_TYPESYSTEM.BOOLEAN_TYPE_ONE),
+        FunctionConsts::FN_ZORBA_NODE_ANCESTOR_OF_2);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_zorba_node_descendant_of,
+        (createQName("http://www.zorba-xquery.com/modules/node","","descendant-of";), 
+        GENV_TYPESYSTEM.ANY_NODE_TYPE_ONE, 
+        GENV_TYPESYSTEM.ANY_NODE_TYPE_ONE, 
+        GENV_TYPESYSTEM.BOOLEAN_TYPE_ONE),
+        FunctionConsts::FN_ZORBA_NODE_DESCENDANT_OF_2);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_zorba_node_parent_of,
+        (createQName("http://www.zorba-xquery.com/modules/node","","parent-of";), 
+        GENV_TYPESYSTEM.ANY_NODE_TYPE_ONE, 
+        GENV_TYPESYSTEM.ANY_NODE_TYPE_ONE, 
+        GENV_TYPESYSTEM.BOOLEAN_TYPE_ONE),
+        FunctionConsts::FN_ZORBA_NODE_PARENT_OF_2);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_zorba_node_child_of,
+        (createQName("http://www.zorba-xquery.com/modules/node","","child-of";), 
+        GENV_TYPESYSTEM.ANY_NODE_TYPE_ONE, 
+        GENV_TYPESYSTEM.ANY_NODE_TYPE_ONE, 
+        GENV_TYPESYSTEM.BOOLEAN_TYPE_ONE),
+        FunctionConsts::FN_ZORBA_NODE_CHILD_OF_2);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_zorba_node_following_of,
+        (createQName("http://www.zorba-xquery.com/modules/node","","following-of";), 
+        GENV_TYPESYSTEM.ANY_NODE_TYPE_ONE, 
+        GENV_TYPESYSTEM.ANY_NODE_TYPE_ONE, 
+        GENV_TYPESYSTEM.BOOLEAN_TYPE_ONE),
+        FunctionConsts::FN_ZORBA_NODE_FOLLOWING_OF_2);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_zorba_node_preceding_of,
+        (createQName("http://www.zorba-xquery.com/modules/node","","preceding-of";), 
+        GENV_TYPESYSTEM.ANY_NODE_TYPE_ONE, 
+        GENV_TYPESYSTEM.ANY_NODE_TYPE_ONE, 
+        GENV_TYPESYSTEM.BOOLEAN_TYPE_ONE),
+        FunctionConsts::FN_ZORBA_NODE_PRECEDING_OF_2);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_zorba_node_following_sibling_of,
+        (createQName("http://www.zorba-xquery.com/modules/node","","following-sibling-of";), 
+        GENV_TYPESYSTEM.ANY_NODE_TYPE_ONE, 
+        GENV_TYPESYSTEM.ANY_NODE_TYPE_ONE, 
+        GENV_TYPESYSTEM.BOOLEAN_TYPE_ONE),
+        FunctionConsts::FN_ZORBA_NODE_FOLLOWING_SIBLING_OF_2);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_zorba_node_preceding_sibling_of,
+        (createQName("http://www.zorba-xquery.com/modules/node","","preceding-sibling-of";), 
+        GENV_TYPESYSTEM.ANY_NODE_TYPE_ONE, 
+        GENV_TYPESYSTEM.ANY_NODE_TYPE_ONE, 
+        GENV_TYPESYSTEM.BOOLEAN_TYPE_ONE),
+        FunctionConsts::FN_ZORBA_NODE_PRECEDING_SIBLING_OF_2);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_zorba_node_level,
+        (createQName("http://www.zorba-xquery.com/modules/node","","level";), 
+        GENV_TYPESYSTEM.ANY_NODE_TYPE_ONE, 
+        GENV_TYPESYSTEM.INTEGER_TYPE_ONE),
+        FunctionConsts::FN_ZORBA_NODE_LEVEL_1);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_zorba_node_least_common_ancestor,
+        (createQName("http://www.zorba-xquery.com/modules/node","","least-common-ancestor";), 
+        GENV_TYPESYSTEM.ANY_NODE_TYPE_ONE, 
+        GENV_TYPESYSTEM.ANY_NODE_TYPE_ONE, 
+        GENV_TYPESYSTEM.ANY_NODE_TYPE_QUESTION),
+        FunctionConsts::FN_ZORBA_NODE_LEAST_COMMON_ANCESTOR_2);
+
+  }
+
+}
+
+
+}
+
+
+

=== modified file 'src/functions/pregenerated/func_nodes.h'
--- src/functions/pregenerated/func_nodes.h	2012-03-28 23:58:23 +0000
+++ src/functions/pregenerated/func_nodes.h	2012-04-13 09:35:12 +0000
@@ -1,383 +1,383 @@
-/*
- * Copyright 2006-2008 The FLWOR Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- 
-// ******************************************
-// *                                        *
-// * THIS IS A GENERATED FILE. DO NOT EDIT! *
-// * SEE .xml FILE WITH SAME NAME           *
-// *                                        *
-// ******************************************
-
-
-#ifndef ZORBA_FUNCTIONS_NODES_H
-#define ZORBA_FUNCTIONS_NODES_H
-
-
-#include "common/shared_types.h"
-#include "functions/function_impl.h"
-
-
-namespace zorba {
-
-
-void populate_context_nodes(static_context* sctx);
-
-
-
-
-//fn-zorba-ref:node-reference
-class fn_zorba_ref_node_reference : public function
-{
-public:
-  fn_zorba_ref_node_reference(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-
-  }
-
-  bool mustCopyInputNodes(expr* fo, csize producer) const { return true; }
-
-  CODEGEN_DECL();
-};
-
-
-//fn-zorba-ref:node-by-reference
-class fn_zorba_ref_node_by_reference : public function
-{
-public:
-  fn_zorba_ref_node_by_reference(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-
-  }
-
-  CODEGEN_DECL();
-};
-
-
-//fn:local-name
-class fn_local_name : public function
-{
-public:
-  fn_local_name(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-
-  }
-
-  bool mustCopyInputNodes(expr* fo, csize producer) const { return false; }
-
-  CODEGEN_DECL();
-};
-
-
-//fn:namespace-uri
-class fn_namespace_uri : public function
-{
-public:
-  fn_namespace_uri(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-
-  }
-
-  bool mustCopyInputNodes(expr* fo, csize producer) const { return false; }
-
-  CODEGEN_DECL();
-};
-
-
-//fn:lang
-class fn_lang : public function
-{
-public:
-  fn_lang(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-
-  }
-
-  bool mustCopyInputNodes(expr* fo, csize producer) const { return false; }
-
-  CODEGEN_DECL();
-};
-
-
-//fn:number
-class fn_number : public function
-{
-public:
-  fn_number(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-
-  }
-
-  CODEGEN_DECL();
-};
-
-
-//fn:has-children
-class fn_has_children_3_0 : public function
-{
-public:
-  fn_has_children_3_0(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-theXQueryVersion = StaticContextConsts::xquery_version_3_0;
-  }
-
-  CODEGEN_DECL();
-};
-
-
-//fn:innermost
-class fn_innermost_3_0 : public function
-{
-public:
-  fn_innermost_3_0(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-theXQueryVersion = StaticContextConsts::xquery_version_3_0;
-  }
-
-  bool mustCopyInputNodes(expr* fo, csize producer) const { return true; }
-
-  CODEGEN_DECL();
-};
-
-
-//fn:outermost
-class fn_outermost_3_0 : public function
-{
-public:
-  fn_outermost_3_0(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-theXQueryVersion = StaticContextConsts::xquery_version_3_0;
-  }
-
-  bool mustCopyInputNodes(expr* fo, csize producer) const { return true; }
-
-  CODEGEN_DECL();
-};
-
-
-//fn:generate-id
-class fn_generate_id_3_0 : public function
-{
-public:
-  fn_generate_id_3_0(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-theXQueryVersion = StaticContextConsts::xquery_version_3_0;
-  }
-
-  bool mustCopyInputNodes(expr* fo, csize producer) const { return true; }
-
-  CODEGEN_DECL();
-};
-
-
-//fn-zorba-node:ancestor-of
-class fn_zorba_node_ancestor_of : public function
-{
-public:
-  fn_zorba_node_ancestor_of(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-
-  }
-
-  bool mustCopyInputNodes(expr* fo, csize producer) const { return true; }
-
-  CODEGEN_DECL();
-};
-
-
-//fn-zorba-node:descendant-of
-class fn_zorba_node_descendant_of : public function
-{
-public:
-  fn_zorba_node_descendant_of(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-
-  }
-
-  bool mustCopyInputNodes(expr* fo, csize producer) const { return true; }
-
-  CODEGEN_DECL();
-};
-
-
-//fn-zorba-node:parent-of
-class fn_zorba_node_parent_of : public function
-{
-public:
-  fn_zorba_node_parent_of(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-
-  }
-
-  bool mustCopyInputNodes(expr* fo, csize producer) const { return true; }
-
-  CODEGEN_DECL();
-};
-
-
-//fn-zorba-node:child-of
-class fn_zorba_node_child_of : public function
-{
-public:
-  fn_zorba_node_child_of(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-
-  }
-
-  bool mustCopyInputNodes(expr* fo, csize producer) const { return true; }
-
-  CODEGEN_DECL();
-};
-
-
-//fn-zorba-node:following-of
-class fn_zorba_node_following_of : public function
-{
-public:
-  fn_zorba_node_following_of(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-
-  }
-
-  bool mustCopyInputNodes(expr* fo, csize producer) const { return true; }
-
-  CODEGEN_DECL();
-};
-
-
-//fn-zorba-node:preceding-of
-class fn_zorba_node_preceding_of : public function
-{
-public:
-  fn_zorba_node_preceding_of(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-
-  }
-
-  bool mustCopyInputNodes(expr* fo, csize producer) const { return true; }
-
-  CODEGEN_DECL();
-};
-
-
-//fn-zorba-node:following-sibling-of
-class fn_zorba_node_following_sibling_of : public function
-{
-public:
-  fn_zorba_node_following_sibling_of(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-
-  }
-
-  bool mustCopyInputNodes(expr* fo, csize producer) const { return true; }
-
-  CODEGEN_DECL();
-};
-
-
-//fn-zorba-node:preceding-sibling-of
-class fn_zorba_node_preceding_sibling_of : public function
-{
-public:
-  fn_zorba_node_preceding_sibling_of(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-
-  }
-
-  bool mustCopyInputNodes(expr* fo, csize producer) const { return true; }
-
-  CODEGEN_DECL();
-};
-
-
-//fn-zorba-node:level
-class fn_zorba_node_level : public function
-{
-public:
-  fn_zorba_node_level(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-
-  }
-
-  bool mustCopyInputNodes(expr* fo, csize producer) const { return true; }
-
-  CODEGEN_DECL();
-};
-
-
-//fn-zorba-node:least-common-ancestor
-class fn_zorba_node_least_common_ancestor : public function
-{
-public:
-  fn_zorba_node_least_common_ancestor(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-
-  }
-
-  bool mustCopyInputNodes(expr* fo, csize producer) const { return true; }
-
-  CODEGEN_DECL();
-};
-
-
-} //namespace zorba
-
-
-#endif
-/*
- * Local variables:
- * mode: c++
- * End:
- */ 
+/*
+ * Copyright 2006-2008 The FLWOR Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+ 
+// ******************************************
+// *                                        *
+// * THIS IS A GENERATED FILE. DO NOT EDIT! *
+// * SEE .xml FILE WITH SAME NAME           *
+// *                                        *
+// ******************************************
+
+
+#ifndef ZORBA_FUNCTIONS_NODES_H
+#define ZORBA_FUNCTIONS_NODES_H
+
+
+#include "common/shared_types.h"
+#include "functions/function_impl.h"
+
+
+namespace zorba {
+
+
+void populate_context_nodes(static_context* sctx);
+
+
+
+
+//fn-zorba-ref:node-reference
+class fn_zorba_ref_node_reference : public function
+{
+public:
+  fn_zorba_ref_node_reference(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  bool mustCopyInputNodes(expr* fo, csize producer) const { return true; }
+
+  CODEGEN_DECL();
+};
+
+
+//fn-zorba-ref:node-by-reference
+class fn_zorba_ref_node_by_reference : public function
+{
+public:
+  fn_zorba_ref_node_by_reference(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  CODEGEN_DECL();
+};
+
+
+//fn:local-name
+class fn_local_name : public function
+{
+public:
+  fn_local_name(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  bool mustCopyInputNodes(expr* fo, csize producer) const { return false; }
+
+  CODEGEN_DECL();
+};
+
+
+//fn:namespace-uri
+class fn_namespace_uri : public function
+{
+public:
+  fn_namespace_uri(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  bool mustCopyInputNodes(expr* fo, csize producer) const { return false; }
+
+  CODEGEN_DECL();
+};
+
+
+//fn:lang
+class fn_lang : public function
+{
+public:
+  fn_lang(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  bool mustCopyInputNodes(expr* fo, csize producer) const { return false; }
+
+  CODEGEN_DECL();
+};
+
+
+//fn:number
+class fn_number : public function
+{
+public:
+  fn_number(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  CODEGEN_DECL();
+};
+
+
+//fn:has-children
+class fn_has_children_3_0 : public function
+{
+public:
+  fn_has_children_3_0(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+theXQueryVersion = StaticContextConsts::xquery_version_3_0;
+  }
+
+  CODEGEN_DECL();
+};
+
+
+//fn:innermost
+class fn_innermost_3_0 : public function
+{
+public:
+  fn_innermost_3_0(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+theXQueryVersion = StaticContextConsts::xquery_version_3_0;
+  }
+
+  bool mustCopyInputNodes(expr* fo, csize producer) const { return true; }
+
+  CODEGEN_DECL();
+};
+
+
+//fn:outermost
+class fn_outermost_3_0 : public function
+{
+public:
+  fn_outermost_3_0(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+theXQueryVersion = StaticContextConsts::xquery_version_3_0;
+  }
+
+  bool mustCopyInputNodes(expr* fo, csize producer) const { return true; }
+
+  CODEGEN_DECL();
+};
+
+
+//fn:generate-id
+class fn_generate_id_3_0 : public function
+{
+public:
+  fn_generate_id_3_0(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+theXQueryVersion = StaticContextConsts::xquery_version_3_0;
+  }
+
+  bool mustCopyInputNodes(expr* fo, csize producer) const { return true; }
+
+  CODEGEN_DECL();
+};
+
+
+//fn-zorba-node:ancestor-of
+class fn_zorba_node_ancestor_of : public function
+{
+public:
+  fn_zorba_node_ancestor_of(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  bool mustCopyInputNodes(expr* fo, csize producer) const { return true; }
+
+  CODEGEN_DECL();
+};
+
+
+//fn-zorba-node:descendant-of
+class fn_zorba_node_descendant_of : public function
+{
+public:
+  fn_zorba_node_descendant_of(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  bool mustCopyInputNodes(expr* fo, csize producer) const { return true; }
+
+  CODEGEN_DECL();
+};
+
+
+//fn-zorba-node:parent-of
+class fn_zorba_node_parent_of : public function
+{
+public:
+  fn_zorba_node_parent_of(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  bool mustCopyInputNodes(expr* fo, csize producer) const { return true; }
+
+  CODEGEN_DECL();
+};
+
+
+//fn-zorba-node:child-of
+class fn_zorba_node_child_of : public function
+{
+public:
+  fn_zorba_node_child_of(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  bool mustCopyInputNodes(expr* fo, csize producer) const { return true; }
+
+  CODEGEN_DECL();
+};
+
+
+//fn-zorba-node:following-of
+class fn_zorba_node_following_of : public function
+{
+public:
+  fn_zorba_node_following_of(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  bool mustCopyInputNodes(expr* fo, csize producer) const { return true; }
+
+  CODEGEN_DECL();
+};
+
+
+//fn-zorba-node:preceding-of
+class fn_zorba_node_preceding_of : public function
+{
+public:
+  fn_zorba_node_preceding_of(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  bool mustCopyInputNodes(expr* fo, csize producer) const { return true; }
+
+  CODEGEN_DECL();
+};
+
+
+//fn-zorba-node:following-sibling-of
+class fn_zorba_node_following_sibling_of : public function
+{
+public:
+  fn_zorba_node_following_sibling_of(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  bool mustCopyInputNodes(expr* fo, csize producer) const { return true; }
+
+  CODEGEN_DECL();
+};
+
+
+//fn-zorba-node:preceding-sibling-of
+class fn_zorba_node_preceding_sibling_of : public function
+{
+public:
+  fn_zorba_node_preceding_sibling_of(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  bool mustCopyInputNodes(expr* fo, csize producer) const { return true; }
+
+  CODEGEN_DECL();
+};
+
+
+//fn-zorba-node:level
+class fn_zorba_node_level : public function
+{
+public:
+  fn_zorba_node_level(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  bool mustCopyInputNodes(expr* fo, csize producer) const { return true; }
+
+  CODEGEN_DECL();
+};
+
+
+//fn-zorba-node:least-common-ancestor
+class fn_zorba_node_least_common_ancestor : public function
+{
+public:
+  fn_zorba_node_least_common_ancestor(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  bool mustCopyInputNodes(expr* fo, csize producer) const { return true; }
+
+  CODEGEN_DECL();
+};
+
+
+} //namespace zorba
+
+
+#endif
+/*
+ * Local variables:
+ * mode: c++
+ * End:
+ */ 

=== modified file 'src/functions/pregenerated/func_numerics.cpp'
--- src/functions/pregenerated/func_numerics.cpp	2012-03-28 05:19:57 +0000
+++ src/functions/pregenerated/func_numerics.cpp	2012-04-13 09:35:12 +0000
@@ -1,260 +1,260 @@
-/*
- * Copyright 2006-2008 The FLWOR Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- 
-// ******************************************
-// *                                        *
-// * THIS IS A GENERATED FILE. DO NOT EDIT! *
-// * SEE .xml FILE WITH SAME NAME           *
-// *                                        *
-// ******************************************
-
-
-#include "stdafx.h"
-#include "runtime/numerics/numerics.h"
-#include "functions/func_numerics.h"
-
-
-namespace zorba{
-
-
-
-PlanIter_t fn_abs::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new AbsIterator(sctx, loc, argv);
-}
-
-PlanIter_t fn_ceiling::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new CeilingIterator(sctx, loc, argv);
-}
-
-PlanIter_t fn_floor::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new FloorIterator(sctx, loc, argv);
-}
-
-PlanIter_t fn_round_3_0::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new RoundIterator(sctx, loc, argv);
-}
-PlanIter_t fn_round::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new RoundIterator(sctx, loc, argv);
-}
-
-PlanIter_t fn_round_half_to_even::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new RoundHalfToEvenIterator(sctx, loc, argv);
-}
-
-PlanIter_t fn_format_number_3_0::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new FormatNumberIterator(sctx, loc, argv);
-}
-
-PlanIter_t fn_format_integer_3_0::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new FormatIntegerIterator(sctx, loc, argv);
-}
-
-void populate_context_numerics(static_context* sctx)
-{
-  {
-    
-
-    DECL_WITH_KIND(sctx, fn_abs,
-        (createQName("http://www.w3.org/2005/xpath-functions","","abs";), 
-        GENV_TYPESYSTEM.ANY_ATOMIC_TYPE_QUESTION, 
-        GENV_TYPESYSTEM.ANY_ATOMIC_TYPE_QUESTION),
-        FunctionConsts::FN_ABS_1);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, fn_ceiling,
-        (createQName("http://www.w3.org/2005/xpath-functions","","ceiling";), 
-        GENV_TYPESYSTEM.ANY_ATOMIC_TYPE_QUESTION, 
-        GENV_TYPESYSTEM.ANY_ATOMIC_TYPE_QUESTION),
-        FunctionConsts::FN_CEILING_1);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, fn_floor,
-        (createQName("http://www.w3.org/2005/xpath-functions","","floor";), 
-        GENV_TYPESYSTEM.ANY_ATOMIC_TYPE_QUESTION, 
-        GENV_TYPESYSTEM.ANY_ATOMIC_TYPE_QUESTION),
-        FunctionConsts::FN_FLOOR_1);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, fn_round,
-        (createQName("http://www.w3.org/2005/xpath-functions","","round";), 
-        GENV_TYPESYSTEM.ANY_ATOMIC_TYPE_QUESTION, 
-        GENV_TYPESYSTEM.ANY_ATOMIC_TYPE_QUESTION),
-        FunctionConsts::FN_ROUND_1);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, fn_round_3_0,
-        (createQName("http://www.w3.org/2005/xpath-functions","","round";), 
-        GENV_TYPESYSTEM.ANY_ATOMIC_TYPE_QUESTION, 
-        GENV_TYPESYSTEM.INTEGER_TYPE_ONE, 
-        GENV_TYPESYSTEM.ANY_ATOMIC_TYPE_QUESTION),
-        FunctionConsts::FN_ROUND_2);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, fn_round_half_to_even,
-        (createQName("http://www.w3.org/2005/xpath-functions","","round-half-to-even";), 
-        GENV_TYPESYSTEM.ANY_ATOMIC_TYPE_QUESTION, 
-        GENV_TYPESYSTEM.ANY_ATOMIC_TYPE_QUESTION),
-        FunctionConsts::FN_ROUND_HALF_TO_EVEN_1);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, fn_round_half_to_even,
-        (createQName("http://www.w3.org/2005/xpath-functions","","round-half-to-even";), 
-        GENV_TYPESYSTEM.ANY_ATOMIC_TYPE_QUESTION, 
-        GENV_TYPESYSTEM.INTEGER_TYPE_ONE, 
-        GENV_TYPESYSTEM.ANY_ATOMIC_TYPE_QUESTION),
-        FunctionConsts::FN_ROUND_HALF_TO_EVEN_2);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, fn_format_number_3_0,
-        (createQName("http://www.w3.org/2005/xpath-functions","","format-number";), 
-        GENV_TYPESYSTEM.ANY_ATOMIC_TYPE_QUESTION, 
-        GENV_TYPESYSTEM.STRING_TYPE_ONE, 
-        GENV_TYPESYSTEM.STRING_TYPE_ONE),
-        FunctionConsts::FN_FORMAT_NUMBER_2);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, fn_format_number_3_0,
-        (createQName("http://www.w3.org/2005/xpath-functions","","format-number";), 
-        GENV_TYPESYSTEM.ANY_ATOMIC_TYPE_QUESTION, 
-        GENV_TYPESYSTEM.STRING_TYPE_ONE, 
-        GENV_TYPESYSTEM.STRING_TYPE_ONE, 
-        GENV_TYPESYSTEM.STRING_TYPE_ONE),
-        FunctionConsts::FN_FORMAT_NUMBER_3);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, fn_format_integer_3_0,
-        (createQName("http://www.w3.org/2005/xpath-functions","","format-integer";), 
-        GENV_TYPESYSTEM.INTEGER_TYPE_QUESTION, 
-        GENV_TYPESYSTEM.STRING_TYPE_ONE, 
-        GENV_TYPESYSTEM.STRING_TYPE_ONE),
-        FunctionConsts::FN_FORMAT_INTEGER_2);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, fn_format_integer_3_0,
-        (createQName("http://www.w3.org/2005/xpath-functions","","format-integer";), 
-        GENV_TYPESYSTEM.INTEGER_TYPE_QUESTION, 
-        GENV_TYPESYSTEM.STRING_TYPE_ONE, 
-        GENV_TYPESYSTEM.STRING_TYPE_ONE, 
-        GENV_TYPESYSTEM.STRING_TYPE_ONE),
-        FunctionConsts::FN_FORMAT_INTEGER_3);
-
-  }
-
-}
-
-
-}
-
-
-
+/*
+ * Copyright 2006-2008 The FLWOR Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+ 
+// ******************************************
+// *                                        *
+// * THIS IS A GENERATED FILE. DO NOT EDIT! *
+// * SEE .xml FILE WITH SAME NAME           *
+// *                                        *
+// ******************************************
+
+
+#include "stdafx.h"
+#include "runtime/numerics/numerics.h"
+#include "functions/func_numerics.h"
+
+
+namespace zorba{
+
+
+
+PlanIter_t fn_abs::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new AbsIterator(sctx, loc, argv);
+}
+
+PlanIter_t fn_ceiling::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new CeilingIterator(sctx, loc, argv);
+}
+
+PlanIter_t fn_floor::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new FloorIterator(sctx, loc, argv);
+}
+
+PlanIter_t fn_round_3_0::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new RoundIterator(sctx, loc, argv);
+}
+PlanIter_t fn_round::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new RoundIterator(sctx, loc, argv);
+}
+
+PlanIter_t fn_round_half_to_even::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new RoundHalfToEvenIterator(sctx, loc, argv);
+}
+
+PlanIter_t fn_format_number_3_0::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new FormatNumberIterator(sctx, loc, argv);
+}
+
+PlanIter_t fn_format_integer_3_0::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new FormatIntegerIterator(sctx, loc, argv);
+}
+
+void populate_context_numerics(static_context* sctx)
+{
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_abs,
+        (createQName("http://www.w3.org/2005/xpath-functions","","abs";), 
+        GENV_TYPESYSTEM.ANY_ATOMIC_TYPE_QUESTION, 
+        GENV_TYPESYSTEM.ANY_ATOMIC_TYPE_QUESTION),
+        FunctionConsts::FN_ABS_1);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_ceiling,
+        (createQName("http://www.w3.org/2005/xpath-functions","","ceiling";), 
+        GENV_TYPESYSTEM.ANY_ATOMIC_TYPE_QUESTION, 
+        GENV_TYPESYSTEM.ANY_ATOMIC_TYPE_QUESTION),
+        FunctionConsts::FN_CEILING_1);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_floor,
+        (createQName("http://www.w3.org/2005/xpath-functions","","floor";), 
+        GENV_TYPESYSTEM.ANY_ATOMIC_TYPE_QUESTION, 
+        GENV_TYPESYSTEM.ANY_ATOMIC_TYPE_QUESTION),
+        FunctionConsts::FN_FLOOR_1);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_round,
+        (createQName("http://www.w3.org/2005/xpath-functions","","round";), 
+        GENV_TYPESYSTEM.ANY_ATOMIC_TYPE_QUESTION, 
+        GENV_TYPESYSTEM.ANY_ATOMIC_TYPE_QUESTION),
+        FunctionConsts::FN_ROUND_1);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_round_3_0,
+        (createQName("http://www.w3.org/2005/xpath-functions","","round";), 
+        GENV_TYPESYSTEM.ANY_ATOMIC_TYPE_QUESTION, 
+        GENV_TYPESYSTEM.INTEGER_TYPE_ONE, 
+        GENV_TYPESYSTEM.ANY_ATOMIC_TYPE_QUESTION),
+        FunctionConsts::FN_ROUND_2);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_round_half_to_even,
+        (createQName("http://www.w3.org/2005/xpath-functions","","round-half-to-even";), 
+        GENV_TYPESYSTEM.ANY_ATOMIC_TYPE_QUESTION, 
+        GENV_TYPESYSTEM.ANY_ATOMIC_TYPE_QUESTION),
+        FunctionConsts::FN_ROUND_HALF_TO_EVEN_1);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_round_half_to_even,
+        (createQName("http://www.w3.org/2005/xpath-functions","","round-half-to-even";), 
+        GENV_TYPESYSTEM.ANY_ATOMIC_TYPE_QUESTION, 
+        GENV_TYPESYSTEM.INTEGER_TYPE_ONE, 
+        GENV_TYPESYSTEM.ANY_ATOMIC_TYPE_QUESTION),
+        FunctionConsts::FN_ROUND_HALF_TO_EVEN_2);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_format_number_3_0,
+        (createQName("http://www.w3.org/2005/xpath-functions","","format-number";), 
+        GENV_TYPESYSTEM.ANY_ATOMIC_TYPE_QUESTION, 
+        GENV_TYPESYSTEM.STRING_TYPE_ONE, 
+        GENV_TYPESYSTEM.STRING_TYPE_ONE),
+        FunctionConsts::FN_FORMAT_NUMBER_2);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_format_number_3_0,
+        (createQName("http://www.w3.org/2005/xpath-functions","","format-number";), 
+        GENV_TYPESYSTEM.ANY_ATOMIC_TYPE_QUESTION, 
+        GENV_TYPESYSTEM.STRING_TYPE_ONE, 
+        GENV_TYPESYSTEM.STRING_TYPE_ONE, 
+        GENV_TYPESYSTEM.STRING_TYPE_ONE),
+        FunctionConsts::FN_FORMAT_NUMBER_3);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_format_integer_3_0,
+        (createQName("http://www.w3.org/2005/xpath-functions","","format-integer";), 
+        GENV_TYPESYSTEM.INTEGER_TYPE_QUESTION, 
+        GENV_TYPESYSTEM.STRING_TYPE_ONE, 
+        GENV_TYPESYSTEM.STRING_TYPE_ONE),
+        FunctionConsts::FN_FORMAT_INTEGER_2);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_format_integer_3_0,
+        (createQName("http://www.w3.org/2005/xpath-functions","","format-integer";), 
+        GENV_TYPESYSTEM.INTEGER_TYPE_QUESTION, 
+        GENV_TYPESYSTEM.STRING_TYPE_ONE, 
+        GENV_TYPESYSTEM.STRING_TYPE_ONE, 
+        GENV_TYPESYSTEM.STRING_TYPE_ONE),
+        FunctionConsts::FN_FORMAT_INTEGER_3);
+
+  }
+
+}
+
+
+}
+
+
+

=== modified file 'src/functions/pregenerated/func_numerics.h'
--- src/functions/pregenerated/func_numerics.h	2012-03-28 05:19:57 +0000
+++ src/functions/pregenerated/func_numerics.h	2012-04-13 09:35:12 +0000
@@ -1,170 +1,170 @@
-/*
- * Copyright 2006-2008 The FLWOR Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- 
-// ******************************************
-// *                                        *
-// * THIS IS A GENERATED FILE. DO NOT EDIT! *
-// * SEE .xml FILE WITH SAME NAME           *
-// *                                        *
-// ******************************************
-
-
-#ifndef ZORBA_FUNCTIONS_NUMERICS_H
-#define ZORBA_FUNCTIONS_NUMERICS_H
-
-
-#include "common/shared_types.h"
-#include "functions/function_impl.h"
-
-
-namespace zorba {
-
-
-void populate_context_numerics(static_context* sctx);
-
-
-
-
-//fn:abs
-class fn_abs : public function
-{
-public:
-  fn_abs(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-
-  }
-
-  CODEGEN_DECL();
-};
-
-
-//fn:ceiling
-class fn_ceiling : public function
-{
-public:
-  fn_ceiling(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-
-  }
-
-  CODEGEN_DECL();
-};
-
-
-//fn:floor
-class fn_floor : public function
-{
-public:
-  fn_floor(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-
-  }
-
-  xqtref_t getReturnType(const fo_expr* caller) const;
-
-  CODEGEN_DECL();
-};
-
-
-//fn:round
-class fn_round_3_0 : public function
-{
-public:
-  fn_round_3_0(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-theXQueryVersion = StaticContextConsts::xquery_version_3_0;
-  }
-
-  CODEGEN_DECL();
-};
-
-//fn:round
-class fn_round : public function
-{
-public:
-  fn_round(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-
-  }
-
-  CODEGEN_DECL();
-};
-
-
-//fn:round-half-to-even
-class fn_round_half_to_even : public function
-{
-public:
-  fn_round_half_to_even(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-
-  }
-
-  CODEGEN_DECL();
-};
-
-
-//fn:format-number
-class fn_format_number_3_0 : public function
-{
-public:
-  fn_format_number_3_0(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-theXQueryVersion = StaticContextConsts::xquery_version_3_0;
-  }
-
-  CODEGEN_DECL();
-};
-
-
-//fn:format-integer
-class fn_format_integer_3_0 : public function
-{
-public:
-  fn_format_integer_3_0(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-theXQueryVersion = StaticContextConsts::xquery_version_3_0;
-  }
-
-  CODEGEN_DECL();
-};
-
-
-} //namespace zorba
-
-
-#endif
-/*
- * Local variables:
- * mode: c++
- * End:
- */ 
+/*
+ * Copyright 2006-2008 The FLWOR Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+ 
+// ******************************************
+// *                                        *
+// * THIS IS A GENERATED FILE. DO NOT EDIT! *
+// * SEE .xml FILE WITH SAME NAME           *
+// *                                        *
+// ******************************************
+
+
+#ifndef ZORBA_FUNCTIONS_NUMERICS_H
+#define ZORBA_FUNCTIONS_NUMERICS_H
+
+
+#include "common/shared_types.h"
+#include "functions/function_impl.h"
+
+
+namespace zorba {
+
+
+void populate_context_numerics(static_context* sctx);
+
+
+
+
+//fn:abs
+class fn_abs : public function
+{
+public:
+  fn_abs(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  CODEGEN_DECL();
+};
+
+
+//fn:ceiling
+class fn_ceiling : public function
+{
+public:
+  fn_ceiling(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  CODEGEN_DECL();
+};
+
+
+//fn:floor
+class fn_floor : public function
+{
+public:
+  fn_floor(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  xqtref_t getReturnType(const fo_expr* caller) const;
+
+  CODEGEN_DECL();
+};
+
+
+//fn:round
+class fn_round_3_0 : public function
+{
+public:
+  fn_round_3_0(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+theXQueryVersion = StaticContextConsts::xquery_version_3_0;
+  }
+
+  CODEGEN_DECL();
+};
+
+//fn:round
+class fn_round : public function
+{
+public:
+  fn_round(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  CODEGEN_DECL();
+};
+
+
+//fn:round-half-to-even
+class fn_round_half_to_even : public function
+{
+public:
+  fn_round_half_to_even(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  CODEGEN_DECL();
+};
+
+
+//fn:format-number
+class fn_format_number_3_0 : public function
+{
+public:
+  fn_format_number_3_0(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+theXQueryVersion = StaticContextConsts::xquery_version_3_0;
+  }
+
+  CODEGEN_DECL();
+};
+
+
+//fn:format-integer
+class fn_format_integer_3_0 : public function
+{
+public:
+  fn_format_integer_3_0(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+theXQueryVersion = StaticContextConsts::xquery_version_3_0;
+  }
+
+  CODEGEN_DECL();
+};
+
+
+} //namespace zorba
+
+
+#endif
+/*
+ * Local variables:
+ * mode: c++
+ * End:
+ */ 

=== modified file 'src/functions/pregenerated/func_other_diagnostics.cpp'
--- src/functions/pregenerated/func_other_diagnostics.cpp	2012-03-28 05:19:57 +0000
+++ src/functions/pregenerated/func_other_diagnostics.cpp	2012-04-13 09:35:12 +0000
@@ -1,84 +1,84 @@
-/*
- * Copyright 2006-2008 The FLWOR Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- 
-// ******************************************
-// *                                        *
-// * THIS IS A GENERATED FILE. DO NOT EDIT! *
-// * SEE .xml FILE WITH SAME NAME           *
-// *                                        *
-// ******************************************
-
-
-#include "stdafx.h"
-#include "runtime/errors_and_diagnostics/other_diagnostics.h"
-#include "functions/func_other_diagnostics.h"
-
-
-namespace zorba{
-
-
-
-PlanIter_t op_zorba_read_line::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new ReadLineIterator(sctx, loc, argv);
-}
-
-PlanIter_t fn_zorba_util_print::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new PrintIterator(sctx, loc, argv);
-}
-
-void populate_context_other_diagnostics(static_context* sctx)
-{
-  {
-    
-
-    DECL_WITH_KIND(sctx, op_zorba_read_line,
-        (createQName("http://www.zorba-xquery.com/internal/zorba-ops","","read-line";), 
-        GENV_TYPESYSTEM.STRING_TYPE_ONE),
-        FunctionConsts::OP_ZORBA_READ_LINE_0);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, fn_zorba_util_print,
-        (createQName("http://www.zorba-xquery.com/zorba/util-functions","","print";), 
-        GENV_TYPESYSTEM.ITEM_TYPE_STAR, 
-        GENV_TYPESYSTEM.EMPTY_TYPE),
-        FunctionConsts::FN_ZORBA_UTIL_PRINT_1);
-
-  }
-
-}
-
-
-}
-
-
-
+/*
+ * Copyright 2006-2008 The FLWOR Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+ 
+// ******************************************
+// *                                        *
+// * THIS IS A GENERATED FILE. DO NOT EDIT! *
+// * SEE .xml FILE WITH SAME NAME           *
+// *                                        *
+// ******************************************
+
+
+#include "stdafx.h"
+#include "runtime/errors_and_diagnostics/other_diagnostics.h"
+#include "functions/func_other_diagnostics.h"
+
+
+namespace zorba{
+
+
+
+PlanIter_t op_zorba_read_line::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new ReadLineIterator(sctx, loc, argv);
+}
+
+PlanIter_t fn_zorba_util_print::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new PrintIterator(sctx, loc, argv);
+}
+
+void populate_context_other_diagnostics(static_context* sctx)
+{
+  {
+    
+
+    DECL_WITH_KIND(sctx, op_zorba_read_line,
+        (createQName("http://www.zorba-xquery.com/internal/zorba-ops","","read-line";), 
+        GENV_TYPESYSTEM.STRING_TYPE_ONE),
+        FunctionConsts::OP_ZORBA_READ_LINE_0);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_zorba_util_print,
+        (createQName("http://www.zorba-xquery.com/zorba/util-functions","","print";), 
+        GENV_TYPESYSTEM.ITEM_TYPE_STAR, 
+        GENV_TYPESYSTEM.EMPTY_TYPE),
+        FunctionConsts::FN_ZORBA_UTIL_PRINT_1);
+
+  }
+
+}
+
+
+}
+
+
+

=== modified file 'src/functions/pregenerated/func_other_diagnostics.h'
--- src/functions/pregenerated/func_other_diagnostics.h	2012-03-28 05:19:57 +0000
+++ src/functions/pregenerated/func_other_diagnostics.h	2012-04-13 09:35:12 +0000
@@ -1,83 +1,83 @@
-/*
- * Copyright 2006-2008 The FLWOR Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- 
-// ******************************************
-// *                                        *
-// * THIS IS A GENERATED FILE. DO NOT EDIT! *
-// * SEE .xml FILE WITH SAME NAME           *
-// *                                        *
-// ******************************************
-
-
-#ifndef ZORBA_FUNCTIONS_OTHER_DIAGNOSTICS_H
-#define ZORBA_FUNCTIONS_OTHER_DIAGNOSTICS_H
-
-
-#include "common/shared_types.h"
-#include "functions/function_impl.h"
-
-
-namespace zorba {
-
-
-void populate_context_other_diagnostics(static_context* sctx);
-
-
-
-
-//op-zorba:read-line
-class op_zorba_read_line : public function
-{
-public:
-  op_zorba_read_line(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-
-  }
-
-  bool accessesDynCtx() const { return true; }
-
-  CODEGEN_DECL();
-};
-
-
-//fn-zorba-util:print
-class fn_zorba_util_print : public function
-{
-public:
-  fn_zorba_util_print(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-
-  }
-
-  bool accessesDynCtx() const { return true; }
-
-  CODEGEN_DECL();
-};
-
-
-} //namespace zorba
-
-
-#endif
-/*
- * Local variables:
- * mode: c++
- * End:
- */ 
+/*
+ * Copyright 2006-2008 The FLWOR Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+ 
+// ******************************************
+// *                                        *
+// * THIS IS A GENERATED FILE. DO NOT EDIT! *
+// * SEE .xml FILE WITH SAME NAME           *
+// *                                        *
+// ******************************************
+
+
+#ifndef ZORBA_FUNCTIONS_OTHER_DIAGNOSTICS_H
+#define ZORBA_FUNCTIONS_OTHER_DIAGNOSTICS_H
+
+
+#include "common/shared_types.h"
+#include "functions/function_impl.h"
+
+
+namespace zorba {
+
+
+void populate_context_other_diagnostics(static_context* sctx);
+
+
+
+
+//op-zorba:read-line
+class op_zorba_read_line : public function
+{
+public:
+  op_zorba_read_line(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  bool accessesDynCtx() const { return true; }
+
+  CODEGEN_DECL();
+};
+
+
+//fn-zorba-util:print
+class fn_zorba_util_print : public function
+{
+public:
+  fn_zorba_util_print(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  bool accessesDynCtx() const { return true; }
+
+  CODEGEN_DECL();
+};
+
+
+} //namespace zorba
+
+
+#endif
+/*
+ * Local variables:
+ * mode: c++
+ * End:
+ */ 

=== modified file 'src/functions/pregenerated/func_parsing_and_serializing.cpp'
--- src/functions/pregenerated/func_parsing_and_serializing.cpp	2012-03-28 05:19:57 +0000
+++ src/functions/pregenerated/func_parsing_and_serializing.cpp	2012-04-13 09:35:12 +0000
@@ -1,111 +1,111 @@
-/*
- * Copyright 2006-2008 The FLWOR Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- 
-// ******************************************
-// *                                        *
-// * THIS IS A GENERATED FILE. DO NOT EDIT! *
-// * SEE .xml FILE WITH SAME NAME           *
-// *                                        *
-// ******************************************
-
-
-#include "stdafx.h"
-#include "runtime/parsing_and_serializing/parsing_and_serializing.h"
-#include "functions/func_parsing_and_serializing.h"
-
-
-namespace zorba{
-
-
-
-PlanIter_t fn_parse_xml_3_0::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new FnParseXmlIterator(sctx, loc, argv);
-}
-
-PlanIter_t fn_serialize_3_0::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new FnSerializeIterator(sctx, loc, argv);
-}
-
-void populate_context_parsing_and_serializing(static_context* sctx)
-{
-  {
-    
-
-    DECL_WITH_KIND(sctx, fn_parse_xml_3_0,
-        (createQName("http://www.w3.org/2005/xpath-functions","","parse-xml";), 
-        GENV_TYPESYSTEM.STRING_TYPE_QUESTION, 
-        GENV_TYPESYSTEM.DOCUMENT_TYPE_ONE),
-        FunctionConsts::FN_PARSE_XML_1);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, fn_parse_xml_3_0,
-        (createQName("http://www.w3.org/2005/xpath-functions","","parse-xml";), 
-        GENV_TYPESYSTEM.STRING_TYPE_QUESTION, 
-        GENV_TYPESYSTEM.STRING_TYPE_ONE, 
-        GENV_TYPESYSTEM.ANY_NODE_TYPE_STAR),
-        FunctionConsts::FN_PARSE_XML_2);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, fn_serialize_3_0,
-        (createQName("http://www.w3.org/2005/xpath-functions","","serialize";), 
-        GENV_TYPESYSTEM.ITEM_TYPE_STAR, 
-        GENV_TYPESYSTEM.STRING_TYPE_ONE),
-        FunctionConsts::FN_SERIALIZE_1);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, fn_serialize_3_0,
-        (createQName("http://www.w3.org/2005/xpath-functions","","serialize";), 
-        GENV_TYPESYSTEM.ITEM_TYPE_STAR, 
-        GENV_TYPESYSTEM.ELEMENT_TYPE_QUESTION, 
-        GENV_TYPESYSTEM.STRING_TYPE_ONE),
-        FunctionConsts::FN_SERIALIZE_2);
-
-  }
-
-}
-
-
-}
-
-
-
+/*
+ * Copyright 2006-2008 The FLWOR Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+ 
+// ******************************************
+// *                                        *
+// * THIS IS A GENERATED FILE. DO NOT EDIT! *
+// * SEE .xml FILE WITH SAME NAME           *
+// *                                        *
+// ******************************************
+
+
+#include "stdafx.h"
+#include "runtime/parsing_and_serializing/parsing_and_serializing.h"
+#include "functions/func_parsing_and_serializing.h"
+
+
+namespace zorba{
+
+
+
+PlanIter_t fn_parse_xml_3_0::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new FnParseXmlIterator(sctx, loc, argv);
+}
+
+PlanIter_t fn_serialize_3_0::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new FnSerializeIterator(sctx, loc, argv);
+}
+
+void populate_context_parsing_and_serializing(static_context* sctx)
+{
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_parse_xml_3_0,
+        (createQName("http://www.w3.org/2005/xpath-functions","","parse-xml";), 
+        GENV_TYPESYSTEM.STRING_TYPE_QUESTION, 
+        GENV_TYPESYSTEM.DOCUMENT_TYPE_ONE),
+        FunctionConsts::FN_PARSE_XML_1);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_parse_xml_3_0,
+        (createQName("http://www.w3.org/2005/xpath-functions","","parse-xml";), 
+        GENV_TYPESYSTEM.STRING_TYPE_QUESTION, 
+        GENV_TYPESYSTEM.STRING_TYPE_ONE, 
+        GENV_TYPESYSTEM.ANY_NODE_TYPE_STAR),
+        FunctionConsts::FN_PARSE_XML_2);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_serialize_3_0,
+        (createQName("http://www.w3.org/2005/xpath-functions","","serialize";), 
+        GENV_TYPESYSTEM.ITEM_TYPE_STAR, 
+        GENV_TYPESYSTEM.STRING_TYPE_ONE),
+        FunctionConsts::FN_SERIALIZE_1);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_serialize_3_0,
+        (createQName("http://www.w3.org/2005/xpath-functions","","serialize";), 
+        GENV_TYPESYSTEM.ITEM_TYPE_STAR, 
+        GENV_TYPESYSTEM.ELEMENT_TYPE_QUESTION, 
+        GENV_TYPESYSTEM.STRING_TYPE_ONE),
+        FunctionConsts::FN_SERIALIZE_2);
+
+  }
+
+}
+
+
+}
+
+
+

=== modified file 'src/functions/pregenerated/func_parsing_and_serializing.h'
--- src/functions/pregenerated/func_parsing_and_serializing.h	2012-03-28 05:19:57 +0000
+++ src/functions/pregenerated/func_parsing_and_serializing.h	2012-04-13 09:35:12 +0000
@@ -1,89 +1,89 @@
-/*
- * Copyright 2006-2008 The FLWOR Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- 
-// ******************************************
-// *                                        *
-// * THIS IS A GENERATED FILE. DO NOT EDIT! *
-// * SEE .xml FILE WITH SAME NAME           *
-// *                                        *
-// ******************************************
-
-
-#ifndef ZORBA_FUNCTIONS_PARSING_AND_SERIALIZING_H
-#define ZORBA_FUNCTIONS_PARSING_AND_SERIALIZING_H
-
-
-#include "common/shared_types.h"
-#include "functions/function_impl.h"
-
-
-namespace zorba {
-
-
-void populate_context_parsing_and_serializing(static_context* sctx);
-
-
-
-
-//fn:parse-xml
-class fn_parse_xml_3_0 : public function
-{
-public:
-  fn_parse_xml_3_0(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-theXQueryVersion = StaticContextConsts::xquery_version_3_0;
-  }
-
-  bool accessesDynCtx() const { return true; }
-
-  bool isSource() const { return true; }
-
-  CODEGEN_DECL();
-};
-
-
-//fn:serialize
-class fn_serialize_3_0 : public function
-{
-public:
-  fn_serialize_3_0(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-theXQueryVersion = StaticContextConsts::xquery_version_3_0;
-  }
-
-  bool accessesDynCtx() const { return true; }
-
-  bool isSource() const { return true; }
-
-  bool mustCopyInputNodes(expr* fo, csize producer) const;
-
-  CODEGEN_DECL();
-};
-
-
-} //namespace zorba
-
-
-#endif
-/*
- * Local variables:
- * mode: c++
- * End:
- */ 
+/*
+ * Copyright 2006-2008 The FLWOR Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+ 
+// ******************************************
+// *                                        *
+// * THIS IS A GENERATED FILE. DO NOT EDIT! *
+// * SEE .xml FILE WITH SAME NAME           *
+// *                                        *
+// ******************************************
+
+
+#ifndef ZORBA_FUNCTIONS_PARSING_AND_SERIALIZING_H
+#define ZORBA_FUNCTIONS_PARSING_AND_SERIALIZING_H
+
+
+#include "common/shared_types.h"
+#include "functions/function_impl.h"
+
+
+namespace zorba {
+
+
+void populate_context_parsing_and_serializing(static_context* sctx);
+
+
+
+
+//fn:parse-xml
+class fn_parse_xml_3_0 : public function
+{
+public:
+  fn_parse_xml_3_0(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+theXQueryVersion = StaticContextConsts::xquery_version_3_0;
+  }
+
+  bool accessesDynCtx() const { return true; }
+
+  bool isSource() const { return true; }
+
+  CODEGEN_DECL();
+};
+
+
+//fn:serialize
+class fn_serialize_3_0 : public function
+{
+public:
+  fn_serialize_3_0(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+theXQueryVersion = StaticContextConsts::xquery_version_3_0;
+  }
+
+  bool accessesDynCtx() const { return true; }
+
+  bool isSource() const { return true; }
+
+  bool mustCopyInputNodes(expr* fo, csize producer) const;
+
+  CODEGEN_DECL();
+};
+
+
+} //namespace zorba
+
+
+#endif
+/*
+ * Local variables:
+ * mode: c++
+ * End:
+ */ 

=== modified file 'src/functions/pregenerated/func_qnames.cpp'
--- src/functions/pregenerated/func_qnames.cpp	2012-03-28 05:19:57 +0000
+++ src/functions/pregenerated/func_qnames.cpp	2012-04-13 09:35:12 +0000
@@ -1,221 +1,221 @@
-/*
- * Copyright 2006-2008 The FLWOR Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- 
-// ******************************************
-// *                                        *
-// * THIS IS A GENERATED FILE. DO NOT EDIT! *
-// * SEE .xml FILE WITH SAME NAME           *
-// *                                        *
-// ******************************************
-
-
-#include "stdafx.h"
-#include "runtime/qnames/qnames.h"
-#include "functions/func_qnames.h"
-
-
-namespace zorba{
-
-
-
-PlanIter_t fn_resolve_QName::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new ResolveQNameIterator(sctx, loc, argv[0], argv[1]);
-}
-
-PlanIter_t fn_QName::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new QNameIterator(sctx, loc, argv[0], argv[1]);
-}
-
-PlanIter_t op_QName_equal::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new QNameEqualIterator(sctx, loc, argv[0], argv[1]);
-}
-
-PlanIter_t fn_prefix_from_QName::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new PrefixFromQNameIterator(sctx, loc, argv[0]);
-}
-
-PlanIter_t fn_local_name_from_QName::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new LocalNameFromQNameIterator(sctx, loc, argv[0]);
-}
-
-PlanIter_t fn_namespace_uri_from_QName::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new NamespaceUriFromQNameIterator(sctx, loc, argv[0]);
-}
-
-PlanIter_t fn_namespace_uri_for_prefix::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new NamespaceUriForPrefixIterator(sctx, loc, argv);
-}
-
-PlanIter_t fn_in_scope_prefixes::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new InScopePrefixesIterator(sctx, loc, argv[0]);
-}
-
-void populate_context_qnames(static_context* sctx)
-{
-  {
-    
-
-    DECL_WITH_KIND(sctx, fn_resolve_QName,
-        (createQName("http://www.w3.org/2005/xpath-functions","","resolve-QName";), 
-        GENV_TYPESYSTEM.STRING_TYPE_QUESTION, 
-        GENV_TYPESYSTEM.ELEMENT_TYPE_ONE, 
-        GENV_TYPESYSTEM.QNAME_TYPE_QUESTION),
-        FunctionConsts::FN_RESOLVE_QNAME_2);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, fn_QName,
-        (createQName("http://www.w3.org/2005/xpath-functions","","QName";), 
-        GENV_TYPESYSTEM.STRING_TYPE_QUESTION, 
-        GENV_TYPESYSTEM.STRING_TYPE_ONE, 
-        GENV_TYPESYSTEM.QNAME_TYPE_ONE),
-        FunctionConsts::FN_QNAME_2);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, op_QName_equal,
-        (createQName("http://www.zorba-xquery.com/internal/xquery-ops","","QName-equal";), 
-        GENV_TYPESYSTEM.QNAME_TYPE_ONE, 
-        GENV_TYPESYSTEM.QNAME_TYPE_ONE, 
-        GENV_TYPESYSTEM.BOOLEAN_TYPE_ONE),
-        FunctionConsts::OP_QNAME_EQUAL_2);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, fn_prefix_from_QName,
-        (createQName("http://www.w3.org/2005/xpath-functions","","prefix-from-QName";), 
-        GENV_TYPESYSTEM.QNAME_TYPE_QUESTION, 
-        GENV_TYPESYSTEM.NCNAME_TYPE_QUESTION),
-        FunctionConsts::FN_PREFIX_FROM_QNAME_1);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, fn_local_name_from_QName,
-        (createQName("http://www.w3.org/2005/xpath-functions","","local-name-from-QName";), 
-        GENV_TYPESYSTEM.QNAME_TYPE_QUESTION, 
-        GENV_TYPESYSTEM.NCNAME_TYPE_QUESTION),
-        FunctionConsts::FN_LOCAL_NAME_FROM_QNAME_1);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, fn_namespace_uri_from_QName,
-        (createQName("http://www.w3.org/2005/xpath-functions","","namespace-uri-from-QName";), 
-        GENV_TYPESYSTEM.QNAME_TYPE_QUESTION, 
-        GENV_TYPESYSTEM.ANY_URI_TYPE_QUESTION),
-        FunctionConsts::FN_NAMESPACE_URI_FROM_QNAME_1);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, fn_namespace_uri_for_prefix,
-        (createQName("http://www.w3.org/2005/xpath-functions","","namespace-uri-for-prefix";), 
-        GENV_TYPESYSTEM.STRING_TYPE_QUESTION, 
-        GENV_TYPESYSTEM.ELEMENT_TYPE_ONE, 
-        GENV_TYPESYSTEM.ANY_URI_TYPE_QUESTION),
-        FunctionConsts::FN_NAMESPACE_URI_FOR_PREFIX_2);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, fn_in_scope_prefixes,
-        (createQName("http://www.w3.org/2005/xpath-functions","","in-scope-prefixes";), 
-        GENV_TYPESYSTEM.ELEMENT_TYPE_ONE, 
-        GENV_TYPESYSTEM.STRING_TYPE_STAR),
-        FunctionConsts::FN_IN_SCOPE_PREFIXES_1);
-
-  }
-
-}
-
-
-}
-
-
-
+/*
+ * Copyright 2006-2008 The FLWOR Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+ 
+// ******************************************
+// *                                        *
+// * THIS IS A GENERATED FILE. DO NOT EDIT! *
+// * SEE .xml FILE WITH SAME NAME           *
+// *                                        *
+// ******************************************
+
+
+#include "stdafx.h"
+#include "runtime/qnames/qnames.h"
+#include "functions/func_qnames.h"
+
+
+namespace zorba{
+
+
+
+PlanIter_t fn_resolve_QName::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new ResolveQNameIterator(sctx, loc, argv[0], argv[1]);
+}
+
+PlanIter_t fn_QName::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new QNameIterator(sctx, loc, argv[0], argv[1]);
+}
+
+PlanIter_t op_QName_equal::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new QNameEqualIterator(sctx, loc, argv[0], argv[1]);
+}
+
+PlanIter_t fn_prefix_from_QName::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new PrefixFromQNameIterator(sctx, loc, argv[0]);
+}
+
+PlanIter_t fn_local_name_from_QName::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new LocalNameFromQNameIterator(sctx, loc, argv[0]);
+}
+
+PlanIter_t fn_namespace_uri_from_QName::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new NamespaceUriFromQNameIterator(sctx, loc, argv[0]);
+}
+
+PlanIter_t fn_namespace_uri_for_prefix::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new NamespaceUriForPrefixIterator(sctx, loc, argv);
+}
+
+PlanIter_t fn_in_scope_prefixes::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new InScopePrefixesIterator(sctx, loc, argv[0]);
+}
+
+void populate_context_qnames(static_context* sctx)
+{
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_resolve_QName,
+        (createQName("http://www.w3.org/2005/xpath-functions","","resolve-QName";), 
+        GENV_TYPESYSTEM.STRING_TYPE_QUESTION, 
+        GENV_TYPESYSTEM.ELEMENT_TYPE_ONE, 
+        GENV_TYPESYSTEM.QNAME_TYPE_QUESTION),
+        FunctionConsts::FN_RESOLVE_QNAME_2);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_QName,
+        (createQName("http://www.w3.org/2005/xpath-functions","","QName";), 
+        GENV_TYPESYSTEM.STRING_TYPE_QUESTION, 
+        GENV_TYPESYSTEM.STRING_TYPE_ONE, 
+        GENV_TYPESYSTEM.QNAME_TYPE_ONE),
+        FunctionConsts::FN_QNAME_2);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, op_QName_equal,
+        (createQName("http://www.zorba-xquery.com/internal/xquery-ops","","QName-equal";), 
+        GENV_TYPESYSTEM.QNAME_TYPE_ONE, 
+        GENV_TYPESYSTEM.QNAME_TYPE_ONE, 
+        GENV_TYPESYSTEM.BOOLEAN_TYPE_ONE),
+        FunctionConsts::OP_QNAME_EQUAL_2);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_prefix_from_QName,
+        (createQName("http://www.w3.org/2005/xpath-functions","","prefix-from-QName";), 
+        GENV_TYPESYSTEM.QNAME_TYPE_QUESTION, 
+        GENV_TYPESYSTEM.NCNAME_TYPE_QUESTION),
+        FunctionConsts::FN_PREFIX_FROM_QNAME_1);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_local_name_from_QName,
+        (createQName("http://www.w3.org/2005/xpath-functions","","local-name-from-QName";), 
+        GENV_TYPESYSTEM.QNAME_TYPE_QUESTION, 
+        GENV_TYPESYSTEM.NCNAME_TYPE_QUESTION),
+        FunctionConsts::FN_LOCAL_NAME_FROM_QNAME_1);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_namespace_uri_from_QName,
+        (createQName("http://www.w3.org/2005/xpath-functions","","namespace-uri-from-QName";), 
+        GENV_TYPESYSTEM.QNAME_TYPE_QUESTION, 
+        GENV_TYPESYSTEM.ANY_URI_TYPE_QUESTION),
+        FunctionConsts::FN_NAMESPACE_URI_FROM_QNAME_1);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_namespace_uri_for_prefix,
+        (createQName("http://www.w3.org/2005/xpath-functions","","namespace-uri-for-prefix";), 
+        GENV_TYPESYSTEM.STRING_TYPE_QUESTION, 
+        GENV_TYPESYSTEM.ELEMENT_TYPE_ONE, 
+        GENV_TYPESYSTEM.ANY_URI_TYPE_QUESTION),
+        FunctionConsts::FN_NAMESPACE_URI_FOR_PREFIX_2);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_in_scope_prefixes,
+        (createQName("http://www.w3.org/2005/xpath-functions","","in-scope-prefixes";), 
+        GENV_TYPESYSTEM.ELEMENT_TYPE_ONE, 
+        GENV_TYPESYSTEM.STRING_TYPE_STAR),
+        FunctionConsts::FN_IN_SCOPE_PREFIXES_1);
+
+  }
+
+}
+
+
+}
+
+
+

=== modified file 'src/functions/pregenerated/func_qnames.h'
--- src/functions/pregenerated/func_qnames.h	2012-03-28 05:19:57 +0000
+++ src/functions/pregenerated/func_qnames.h	2012-04-13 09:35:12 +0000
@@ -1,175 +1,175 @@
-/*
- * Copyright 2006-2008 The FLWOR Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- 
-// ******************************************
-// *                                        *
-// * THIS IS A GENERATED FILE. DO NOT EDIT! *
-// * SEE .xml FILE WITH SAME NAME           *
-// *                                        *
-// ******************************************
-
-
-#ifndef ZORBA_FUNCTIONS_QNAMES_H
-#define ZORBA_FUNCTIONS_QNAMES_H
-
-
-#include "common/shared_types.h"
-#include "functions/function_impl.h"
-
-
-namespace zorba {
-
-
-void populate_context_qnames(static_context* sctx);
-
-
-
-
-//fn:resolve-QName
-class fn_resolve_QName : public function
-{
-public:
-  fn_resolve_QName(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-
-  }
-
-  bool mustCopyInputNodes(expr* fo, csize producer) const { return producer == 1; }
-
-  CODEGEN_DECL();
-};
-
-
-//fn:QName
-class fn_QName : public function
-{
-public:
-  fn_QName(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-
-  }
-
-  CODEGEN_DECL();
-};
-
-
-//op:QName-equal
-class op_QName_equal : public function
-{
-public:
-  op_QName_equal(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-
-  }
-
-  CODEGEN_DECL();
-};
-
-
-//fn:prefix-from-QName
-class fn_prefix_from_QName : public function
-{
-public:
-  fn_prefix_from_QName(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-
-  }
-
-  CODEGEN_DECL();
-};
-
-
-//fn:local-name-from-QName
-class fn_local_name_from_QName : public function
-{
-public:
-  fn_local_name_from_QName(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-
-  }
-
-  CODEGEN_DECL();
-};
-
-
-//fn:namespace-uri-from-QName
-class fn_namespace_uri_from_QName : public function
-{
-public:
-  fn_namespace_uri_from_QName(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-
-  }
-
-  CODEGEN_DECL();
-};
-
-
-//fn:namespace-uri-for-prefix
-class fn_namespace_uri_for_prefix : public function
-{
-public:
-  fn_namespace_uri_for_prefix(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-
-  }
-
-  bool mustCopyInputNodes(expr* fo, csize producer) const { return producer == 1; }
-
-  CODEGEN_DECL();
-};
-
-
-//fn:in-scope-prefixes
-class fn_in_scope_prefixes : public function
-{
-public:
-  fn_in_scope_prefixes(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-
-  }
-
-  bool mustCopyInputNodes(expr* fo, csize producer) const { return true; }
-
-  CODEGEN_DECL();
-};
-
-
-} //namespace zorba
-
-
-#endif
-/*
- * Local variables:
- * mode: c++
- * End:
- */ 
+/*
+ * Copyright 2006-2008 The FLWOR Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+ 
+// ******************************************
+// *                                        *
+// * THIS IS A GENERATED FILE. DO NOT EDIT! *
+// * SEE .xml FILE WITH SAME NAME           *
+// *                                        *
+// ******************************************
+
+
+#ifndef ZORBA_FUNCTIONS_QNAMES_H
+#define ZORBA_FUNCTIONS_QNAMES_H
+
+
+#include "common/shared_types.h"
+#include "functions/function_impl.h"
+
+
+namespace zorba {
+
+
+void populate_context_qnames(static_context* sctx);
+
+
+
+
+//fn:resolve-QName
+class fn_resolve_QName : public function
+{
+public:
+  fn_resolve_QName(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  bool mustCopyInputNodes(expr* fo, csize producer) const { return producer == 1; }
+
+  CODEGEN_DECL();
+};
+
+
+//fn:QName
+class fn_QName : public function
+{
+public:
+  fn_QName(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  CODEGEN_DECL();
+};
+
+
+//op:QName-equal
+class op_QName_equal : public function
+{
+public:
+  op_QName_equal(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  CODEGEN_DECL();
+};
+
+
+//fn:prefix-from-QName
+class fn_prefix_from_QName : public function
+{
+public:
+  fn_prefix_from_QName(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  CODEGEN_DECL();
+};
+
+
+//fn:local-name-from-QName
+class fn_local_name_from_QName : public function
+{
+public:
+  fn_local_name_from_QName(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  CODEGEN_DECL();
+};
+
+
+//fn:namespace-uri-from-QName
+class fn_namespace_uri_from_QName : public function
+{
+public:
+  fn_namespace_uri_from_QName(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  CODEGEN_DECL();
+};
+
+
+//fn:namespace-uri-for-prefix
+class fn_namespace_uri_for_prefix : public function
+{
+public:
+  fn_namespace_uri_for_prefix(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  bool mustCopyInputNodes(expr* fo, csize producer) const { return producer == 1; }
+
+  CODEGEN_DECL();
+};
+
+
+//fn:in-scope-prefixes
+class fn_in_scope_prefixes : public function
+{
+public:
+  fn_in_scope_prefixes(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  bool mustCopyInputNodes(expr* fo, csize producer) const { return true; }
+
+  CODEGEN_DECL();
+};
+
+
+} //namespace zorba
+
+
+#endif
+/*
+ * Local variables:
+ * mode: c++
+ * End:
+ */ 

=== modified file 'src/functions/pregenerated/func_random.cpp'
--- src/functions/pregenerated/func_random.cpp	2012-03-28 05:19:57 +0000
+++ src/functions/pregenerated/func_random.cpp	2012-04-13 09:35:12 +0000
@@ -1,118 +1,118 @@
-/*
- * Copyright 2006-2008 The FLWOR Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- 
-// ******************************************
-// *                                        *
-// * THIS IS A GENERATED FILE. DO NOT EDIT! *
-// * SEE .xml FILE WITH SAME NAME           *
-// *                                        *
-// ******************************************
-
-
-#include "stdafx.h"
-#include "runtime/random/random.h"
-#include "functions/func_random.h"
-
-
-namespace zorba{
-
-
-
-PlanIter_t fn_zorba_random_seeded_random::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new SeededRandomIterator(sctx, loc, argv);
-}
-
-PlanIter_t fn_zorba_random_random::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new RandomIterator(sctx, loc, argv);
-}
-
-PlanIter_t fn_zorba_util_uuid::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new UuidIterator(sctx, loc, argv);
-}
-
-void populate_context_random(static_context* sctx)
-{
-  {
-    
-
-    DECL_WITH_KIND(sctx, fn_zorba_random_seeded_random,
-        (createQName("http://www.zorba-xquery.com/modules/random","","seeded-random";), 
-        GENV_TYPESYSTEM.INTEGER_TYPE_ONE, 
-        GENV_TYPESYSTEM.INTEGER_TYPE_ONE, 
-        GENV_TYPESYSTEM.INTEGER_TYPE_STAR),
-        FunctionConsts::FN_ZORBA_RANDOM_SEEDED_RANDOM_2);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, fn_zorba_random_random,
-        (createQName("http://www.zorba-xquery.com/modules/random","","random";), 
-        GENV_TYPESYSTEM.INTEGER_TYPE_ONE, 
-        GENV_TYPESYSTEM.INTEGER_TYPE_STAR),
-        FunctionConsts::FN_ZORBA_RANDOM_RANDOM_1);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, fn_zorba_util_uuid,
-        (createQName("http://www.zorba-xquery.com/zorba/util-functions","","uuid";), 
-        GENV_TYPESYSTEM.STRING_TYPE_ONE),
-        FunctionConsts::FN_ZORBA_UTIL_UUID_0);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, fn_zorba_util_uuid,
-        (createQName("http://www.zorba-xquery.com/modules/random","","uuid";), 
-        GENV_TYPESYSTEM.STRING_TYPE_ONE),
-        FunctionConsts::FN_ZORBA_RANDOM_UUID_0);
-
-  }
-
-}
-
-
-}
-
-
-
+/*
+ * Copyright 2006-2008 The FLWOR Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+ 
+// ******************************************
+// *                                        *
+// * THIS IS A GENERATED FILE. DO NOT EDIT! *
+// * SEE .xml FILE WITH SAME NAME           *
+// *                                        *
+// ******************************************
+
+
+#include "stdafx.h"
+#include "runtime/random/random.h"
+#include "functions/func_random.h"
+
+
+namespace zorba{
+
+
+
+PlanIter_t fn_zorba_random_seeded_random::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new SeededRandomIterator(sctx, loc, argv);
+}
+
+PlanIter_t fn_zorba_random_random::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new RandomIterator(sctx, loc, argv);
+}
+
+PlanIter_t fn_zorba_util_uuid::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new UuidIterator(sctx, loc, argv);
+}
+
+void populate_context_random(static_context* sctx)
+{
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_zorba_random_seeded_random,
+        (createQName("http://www.zorba-xquery.com/modules/random","","seeded-random";), 
+        GENV_TYPESYSTEM.INTEGER_TYPE_ONE, 
+        GENV_TYPESYSTEM.INTEGER_TYPE_ONE, 
+        GENV_TYPESYSTEM.INTEGER_TYPE_STAR),
+        FunctionConsts::FN_ZORBA_RANDOM_SEEDED_RANDOM_2);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_zorba_random_random,
+        (createQName("http://www.zorba-xquery.com/modules/random","","random";), 
+        GENV_TYPESYSTEM.INTEGER_TYPE_ONE, 
+        GENV_TYPESYSTEM.INTEGER_TYPE_STAR),
+        FunctionConsts::FN_ZORBA_RANDOM_RANDOM_1);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_zorba_util_uuid,
+        (createQName("http://www.zorba-xquery.com/zorba/util-functions","","uuid";), 
+        GENV_TYPESYSTEM.STRING_TYPE_ONE),
+        FunctionConsts::FN_ZORBA_UTIL_UUID_0);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_zorba_util_uuid,
+        (createQName("http://www.zorba-xquery.com/modules/random","","uuid";), 
+        GENV_TYPESYSTEM.STRING_TYPE_ONE),
+        FunctionConsts::FN_ZORBA_RANDOM_UUID_0);
+
+  }
+
+}
+
+
+}
+
+
+

=== modified file 'src/functions/pregenerated/func_random.h'
--- src/functions/pregenerated/func_random.h	2012-03-28 05:19:57 +0000
+++ src/functions/pregenerated/func_random.h	2012-04-13 09:35:12 +0000
@@ -1,95 +1,95 @@
-/*
- * Copyright 2006-2008 The FLWOR Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- 
-// ******************************************
-// *                                        *
-// * THIS IS A GENERATED FILE. DO NOT EDIT! *
-// * SEE .xml FILE WITH SAME NAME           *
-// *                                        *
-// ******************************************
-
-
-#ifndef ZORBA_FUNCTIONS_RANDOM_H
-#define ZORBA_FUNCTIONS_RANDOM_H
-
-
-#include "common/shared_types.h"
-#include "functions/function_impl.h"
-
-
-namespace zorba {
-
-
-void populate_context_random(static_context* sctx);
-
-
-
-
-//fn-zorba-random:seeded-random
-class fn_zorba_random_seeded_random : public function
-{
-public:
-  fn_zorba_random_seeded_random(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-
-  }
-
-  CODEGEN_DECL();
-};
-
-
-//fn-zorba-random:random
-class fn_zorba_random_random : public function
-{
-public:
-  fn_zorba_random_random(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-
-  }
-
-  CODEGEN_DECL();
-};
-
-
-//fn-zorba-util:uuid
-class fn_zorba_util_uuid : public function
-{
-public:
-  fn_zorba_util_uuid(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-setDeterministic(false);
-
-  }
-
-  CODEGEN_DECL();
-};
-
-
-} //namespace zorba
-
-
-#endif
-/*
- * Local variables:
- * mode: c++
- * End:
- */ 
+/*
+ * Copyright 2006-2008 The FLWOR Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+ 
+// ******************************************
+// *                                        *
+// * THIS IS A GENERATED FILE. DO NOT EDIT! *
+// * SEE .xml FILE WITH SAME NAME           *
+// *                                        *
+// ******************************************
+
+
+#ifndef ZORBA_FUNCTIONS_RANDOM_H
+#define ZORBA_FUNCTIONS_RANDOM_H
+
+
+#include "common/shared_types.h"
+#include "functions/function_impl.h"
+
+
+namespace zorba {
+
+
+void populate_context_random(static_context* sctx);
+
+
+
+
+//fn-zorba-random:seeded-random
+class fn_zorba_random_seeded_random : public function
+{
+public:
+  fn_zorba_random_seeded_random(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  CODEGEN_DECL();
+};
+
+
+//fn-zorba-random:random
+class fn_zorba_random_random : public function
+{
+public:
+  fn_zorba_random_random(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  CODEGEN_DECL();
+};
+
+
+//fn-zorba-util:uuid
+class fn_zorba_util_uuid : public function
+{
+public:
+  fn_zorba_util_uuid(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+setDeterministic(false);
+
+  }
+
+  CODEGEN_DECL();
+};
+
+
+} //namespace zorba
+
+
+#endif
+/*
+ * Local variables:
+ * mode: c++
+ * End:
+ */ 

=== modified file 'src/functions/pregenerated/func_schema.cpp'
--- src/functions/pregenerated/func_schema.cpp	2012-03-28 05:19:57 +0000
+++ src/functions/pregenerated/func_schema.cpp	2012-04-13 09:35:12 +0000
@@ -1,129 +1,129 @@
-/*
- * Copyright 2006-2008 The FLWOR Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- 
-// ******************************************
-// *                                        *
-// * THIS IS A GENERATED FILE. DO NOT EDIT! *
-// * SEE .xml FILE WITH SAME NAME           *
-// *                                        *
-// ******************************************
-
-
-#include "stdafx.h"
-#include "runtime/schema/schema.h"
-#include "functions/func_schema.h"
-
-
-namespace zorba{
-
-
-
-PlanIter_t fn_zorba_schema_validate_in_place::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new ZorbaValidateInPlaceIterator(sctx, loc, argv[0]);
-}
-
-PlanIter_t fn_zorba_util_schema_type::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new ZorbaSchemaTypeIterator(sctx, loc, argv);
-}
-
-PlanIter_t fn_zorba_schema_schema_type::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new ZorbaSchemaTypeIterator(sctx, loc, argv);
-}
-
-PlanIter_t fn_zorba_schema_is_validated::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new ZorbaIsValidatedIterator(sctx, loc, argv);
-}
-
-void populate_context_schema(static_context* sctx)
-{
-  {
-    
-
-    DECL_WITH_KIND(sctx, fn_zorba_schema_validate_in_place,
-        (createQName("http://www.zorba-xquery.com/modules/schema","","validate-in-place";), 
-        GENV_TYPESYSTEM.ANY_NODE_TYPE_ONE, 
-        GENV_TYPESYSTEM.EMPTY_TYPE),
-        FunctionConsts::FN_ZORBA_SCHEMA_VALIDATE_IN_PLACE_1);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, fn_zorba_util_schema_type,
-        (createQName("http://www.zorba-xquery.com/zorba/util-functions","","schema-type";), 
-        GENV_TYPESYSTEM.ITEM_TYPE_ONE, 
-        GENV_TYPESYSTEM.QNAME_TYPE_QUESTION),
-        FunctionConsts::FN_ZORBA_UTIL_SCHEMA_TYPE_1);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, fn_zorba_schema_schema_type,
-        (createQName("http://www.zorba-xquery.com/modules/schema","","schema-type";), 
-        GENV_TYPESYSTEM.ITEM_TYPE_ONE, 
-        GENV_TYPESYSTEM.QNAME_TYPE_QUESTION),
-        FunctionConsts::FN_ZORBA_SCHEMA_SCHEMA_TYPE_1);
-
-  }
-
-
-  {
-    
-
-    DECL_WITH_KIND(sctx, fn_zorba_schema_is_validated,
-        (createQName("http://www.zorba-xquery.com/modules/schema","","is-validated";), 
-        GENV_TYPESYSTEM.ANY_NODE_TYPE_ONE, 
-        GENV_TYPESYSTEM.BOOLEAN_TYPE_ONE),
-        FunctionConsts::FN_ZORBA_SCHEMA_IS_VALIDATED_1);
-
-  }
-
-}
-
-
-}
-
-
-
+/*
+ * Copyright 2006-2008 The FLWOR Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+ 
+// ******************************************
+// *                                        *
+// * THIS IS A GENERATED FILE. DO NOT EDIT! *
+// * SEE .xml FILE WITH SAME NAME           *
+// *                                        *
+// ******************************************
+
+
+#include "stdafx.h"
+#include "runtime/schema/schema.h"
+#include "functions/func_schema.h"
+
+
+namespace zorba{
+
+
+
+PlanIter_t fn_zorba_schema_validate_in_place::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new ZorbaValidateInPlaceIterator(sctx, loc, argv[0]);
+}
+
+PlanIter_t fn_zorba_util_schema_type::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new ZorbaSchemaTypeIterator(sctx, loc, argv);
+}
+
+PlanIter_t fn_zorba_schema_schema_type::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new ZorbaSchemaTypeIterator(sctx, loc, argv);
+}
+
+PlanIter_t fn_zorba_schema_is_validated::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector<PlanIter_t>& argv,
+  expr& ann) const
+{
+  return new ZorbaIsValidatedIterator(sctx, loc, argv);
+}
+
+void populate_context_schema(static_context* sctx)
+{
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_zorba_schema_validate_in_place,
+        (createQName("http://www.zorba-xquery.com/modules/schema","","validate-in-place";), 
+        GENV_TYPESYSTEM.ANY_NODE_TYPE_ONE, 
+        GENV_TYPESYSTEM.EMPTY_TYPE),
+        FunctionConsts::FN_ZORBA_SCHEMA_VALIDATE_IN_PLACE_1);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_zorba_util_schema_type,
+        (createQName("http://www.zorba-xquery.com/zorba/util-functions","","schema-type";), 
+        GENV_TYPESYSTEM.ITEM_TYPE_ONE, 
+        GENV_TYPESYSTEM.QNAME_TYPE_QUESTION),
+        FunctionConsts::FN_ZORBA_UTIL_SCHEMA_TYPE_1);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_zorba_schema_schema_type,
+        (createQName("http://www.zorba-xquery.com/modules/schema","","schema-type";), 
+        GENV_TYPESYSTEM.ITEM_TYPE_ONE, 
+        GENV_TYPESYSTEM.QNAME_TYPE_QUESTION),
+        FunctionConsts::FN_ZORBA_SCHEMA_SCHEMA_TYPE_1);
+
+  }
+
+
+  {
+    
+
+    DECL_WITH_KIND(sctx, fn_zorba_schema_is_validated,
+        (createQName("http://www.zorba-xquery.com/modules/schema","","is-validated";), 
+        GENV_TYPESYSTEM.ANY_NODE_TYPE_ONE, 
+        GENV_TYPESYSTEM.BOOLEAN_TYPE_ONE),
+        FunctionConsts::FN_ZORBA_SCHEMA_IS_VALIDATED_1);
+
+  }
+
+}
+
+
+}
+
+
+

=== modified file 'src/functions/pregenerated/func_schema.h'
--- src/functions/pregenerated/func_schema.h	2012-03-28 05:19:57 +0000
+++ src/functions/pregenerated/func_schema.h	2012-04-13 09:35:12 +0000
@@ -1,121 +1,121 @@
-/*
- * Copyright 2006-2008 The FLWOR Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- 
-// ******************************************
-// *                                        *
-// * THIS IS A GENERATED FILE. DO NOT EDIT! *
-// * SEE .xml FILE WITH SAME NAME           *
-// *                                        *
-// ******************************************
-
-
-#ifndef ZORBA_FUNCTIONS_SCHEMA_H
-#define ZORBA_FUNCTIONS_SCHEMA_H
-
-
-#include "common/shared_types.h"
-#include "functions/function_impl.h"
-
-
-namespace zorba {
-
-
-void populate_context_schema(static_context* sctx);
-
-
-
-
-//fn-zorba-schema:validate-in-place
-class fn_zorba_schema_validate_in_place : public function
-{
-public:
-  fn_zorba_schema_validate_in_place(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-
-  }
-
-  short getScriptingKind() const { return UPDATING_EXPR; }
-
-  bool accessesDynCtx() const { return true; }
-
-  bool mustCopyInputNodes(expr* fo, csize producer) const { return true; }
-
-  CODEGEN_DECL();
-};
-
-
-//fn-zorba-util:schema-type
-class fn_zorba_util_schema_type : public function
-{
-public:
-  fn_zorba_util_schema_type(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-
-  }
-
-  bool mustCopyInputNodes(expr* fo, csize producer) const { return false; }
-
-  CODEGEN_DECL();
-};
-
-
-//fn-zorba-schema:schema-type
-class fn_zorba_schema_schema_type : public function
-{
-public:
-  fn_zorba_schema_schema_type(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-
-  }
-
-  bool mustCopyInputNodes(expr* fo, csize producer) const { return false; }
-
-  CODEGEN_DECL();
-};
-
-
-//fn-zorba-schema:is-validated
-class fn_zorba_schema_is_validated : public function
-{
-public:
-  fn_zorba_schema_is_validated(const signature& sig, FunctionConsts::FunctionKind kind)
-    : 
-    function(sig, kind)
-  {
-
-  }
-
-  bool mustCopyInputNodes(expr* fo, csize producer) const { return false; }
-
-  CODEGEN_DECL();
-};
-
-
-} //namespace zorba
-
-
-#endif
-/*
- * Local variables:
- * mode: c++
- * End:
- */ 
+/*
+ * Copyright 2006-2008 The FLWOR Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+ 
+// ******************************************
+// *                                        *
+// * THIS IS A GENERATED FILE. DO NOT EDIT! *
+// * SEE .xml FILE WITH SAME NAME           *
+// *                                        *
+// ******************************************
+
+
+#ifndef ZORBA_FUNCTIONS_SCHEMA_H
+#define ZORBA_FUNCTIONS_SCHEMA_H
+
+
+#include "common/shared_types.h"
+#include "functions/function_impl.h"
+
+
+namespace zorba {
+
+
+void populate_context_schema(static_context* sctx);
+
+
+
+
+//fn-zorba-schema:validate-in-place
+class fn_zorba_schema_validate_in_place : public function
+{
+public:
+  fn_zorba_schema_validate_in_place(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  short getScriptingKind() const { return UPDATING_EXPR; }
+
+  bool accessesDynCtx() const { return true; }
+
+  bool mustCopyInputNodes(expr* fo, csize producer) const { return true; }
+
+  CODEGEN_DECL();
+};
+
+
+//fn-zorba-util:schema-type
+class fn_zorba_util_schema_type : public function
+{
+public:
+  fn_zorba_util_schema_type(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  bool mustCopyInputNodes(expr* fo, csize producer) const { return false; }
+
+  CODEGEN_DECL();
+};
+
+
+//fn-zorba-schema:schema-type
+class fn_zorba_schema_schema_type : public function
+{
+public:
+  fn_zorba_schema_schema_type(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  bool mustCopyInputNodes(expr* fo, csize producer) const { return false; }
+
+  CODEGEN_DECL();
+};
+
+
+//fn-zorba-schema:is-validated
+class fn_zorba_schema_is_validated : public function
+{
+public:
+  fn_zorba_schema_is_validated(const signature& sig, FunctionConsts::FunctionKind kind)
+    : 
+    function(sig, kind)
+  {
+
+  }
+
+  bool mustCopyInputNodes(expr* fo, csize producer) const { return false; }
+
+  CODEGEN_DECL();
+};
+
+
+} //namespace zorba
+
+
+#endif
+/*
+ * Local variables:
+ * mode: c++
+ * End:
+ */ 

=== modified file 'src/functions/pregenerated/func_sctx.cpp'
--- src/functions/pregenerated/func_sctx.cpp	2012-03-28 23:58:23 +0000
+++ src/functions/pregenerated/func_sctx.cpp	2012-04-13 09:35:12 +0000
@@ -1,572 +1,572 @@
-/*
- * Copyright 2006-2008 The FLWOR Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- 
-// ******************************************
-// *                                        *
-// * THIS IS A GENERATED FILE. DO NOT EDIT! *
-// * SEE .xml FILE WITH SAME NAME           *
-// *                                        *
-// ******************************************
-
-
-#include "stdafx.h"
-#include "runtime/introspection/sctx.h"
-#include "functions/func_sctx.h"
-
-
-namespace zorba{
-
-
-
-PlanIter_t fn_zorba_introspect_sctx_statically_known_namespaces::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new StaticNamespacesIterator(sctx, loc, argv);
-}
-
-PlanIter_t fn_zorba_introspect_sctx_default_function_namespace::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new DefaultFunctionNamespaceIterator(sctx, loc, argv);
-}
-
-PlanIter_t fn_zorba_introspect_sctx_base_uri::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new SctxBaseUriIterator(sctx, loc, argv);
-}
-
-PlanIter_t fn_zorba_introspect_sctx_default_collation::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new SctxDefaultCollationIterator(sctx, loc, argv);
-}
-
-PlanIter_t fn_zorba_introspect_sctx_statically_known_namespace_binding::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new StaticNamespaceBindingIterator(sctx, loc, argv);
-}
-
-PlanIter_t fn_zorba_introspect_sctx_in_scope_variables::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new InscopeVariablesIterator(sctx, loc, argv);
-}
-
-PlanIter_t fn_zorba_introspect_sctx_default_collection_type::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new DefaultCollectionTypeIterator(sctx, loc, argv);
-}
-
-PlanIter_t fn_zorba_introspect_sctx_xpath10_compatibility_mode::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new XPath10CompatModeIterator(sctx, loc, argv);
-}
-
-PlanIter_t fn_zorba_introspect_sctx_statically_known_documents::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new StaticallyKnownDocumentsIterator(sctx, loc, argv);
-}
-
-PlanIter_t fn_zorba_introspect_sctx_statically_known_document_type::codegen(
-  CompilerCB*,
-  static_context* sctx,
-  const QueryLoc& loc,
-  std::vector<PlanIter_t>& argv,
-  expr& ann) const
-{
-  return new S

Follow ups